You need to first Run the following command from an elevated Windows PowerShell window:
Install-Module -Name ExchangeOnlineManagement
This command connects the current PowerShell session using alex@contoso.com account, which is MFA enabled. After the Connect-ExchangeOnline command is successful, you can run ExO V2 module cmdlets and older remote PowerShell cmdlets.
Connect-ExchangeOnline -UserPrincipalName alex@contoso.com -ShowProgress $true
Please note you may need to update the EXO V2 module to latest version that’s available in the PowerShell Gallery:
Update-Module -Name ExchangeOnlineManagement