When connecting to SharePoint using PowerShell the default authentication prompt does not permit the use of hardware security keys (such as YubiKeys or the Security Key by Yubico), to get around this limitation use the -UseSystemBrowser $true parameter at the end of the connection command.
Reference example 6 (at time of publication) at: https://learn.microsoft.com/en-us/powershell/module/microsoft.online.sharepoint.powershell/connect-sposervice?view=sharepoint-ps#example-6