Hello, thank you for reaching out to Microsoft Q&A.
The error message usually appears if your account is temporarily blocked.
Sometimes waiting a day can be enough to remove a block. Don't make lots of repeated attempts, as this may reset any time lock. If there's no change after 24 hours, try signing in with your account using an alternate security method and see if it helps. If that didn't work, we can try the account recovery options next.
That is, on the screen where you are asked to type in your password, select 'Other ways to sign in'. You can then use the alternate security verification methods to receive the code and see if you can sign in successfully.
See if you can sign in.
If you are still having issues, use the account recovery form here to recover your account:-
Remember to use a familiar device from which you've frequently accessed your Microsoft account, as well as a familiar location. Microsoft will review your responses and respond within 24 hours. If you are verified, instructions on how to log back into your account will be sent to you, and if you are not verified, you will need to submit the Account Recovery form again. You can do this up to 2 times every 24 hours.
Once verified, try signing in with your Microsoft account.