Office build 16.0.7967 or later on Windows 10 employs Windows 10's account management capability, Web Account Manager (WAM). This new account integration may cause various types of Office sign-in errors.
First, I would like you to follow this Microsoft article.
If the article does not resolve the issue, follow these steps.
1.Open Office and sign out all accounts of Office.
2.Go to "Windows Setting" - "Accounts" - "Access work or school". If you see any accounts here, disconnect all.
3.Go to "Windows Setting" - "Accounts" - "Email & accounts". If you see any accounts here, click "Manage" - "Delete account from this device".
4.Open Office and see if you can sign in.
Follow these steps:
1.Delete all files from the Accounts folder at the following:
3.Open Office and see if you can sign in.
Hope this article helps you out!