Mare sure there is no windows update pending and connect to SharePoint Online first, then Register-SPMTMigration.
$Global:UserName = "admin@contoso.onmicrosoft.com"
$Global:PassWord = ConvertTo-SecureString -String "YourSPOPassword" -AsPlainText -Force
$Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
Connect-SPOService -Url https://contoso-admin.sharepoint.com -Credential $Global:SPOCredential
Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
If the issue exists, try to run PowerShell in another computer, compare the result.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.