Sorry to hear that you have troubles, to know more about this, please try signing in at account.microsoft.com using an InPrivate browser window. If sign-in also fails there, use Microsoft’s https://support.microsoft.com/en-us/accounts-billing/manage/microsoft-account-sign-in-helper. If it works online but not in Windows, the problem is likely with Windows’ local authentication components.
Please share the results of this test so I can help you better.