Related article: "This PC isn't joined to a domain" error
1. Disconnect and reconnect your Microsoft 365 account. Go through the computer Start menu > Settings > Accounts > Access work or school > highlight your Microsoft 365 account > Disconnect. Then reconnect by going through +Connect, and enter your work Microsoft 365 email address and password to log in.
2. The issue may be caused by corrupted user credentials so you can go to the Credential Manager to remove them completely:
Go to Control Panel > User Accounts > Credential Manager > select Windows Credentials > find the Office related entries and remove them all.
Open a new Word document, enter the Microsoft 365 account and password, and check if the problem persists.
If the problem still occurs, try repairing Microsoft 365 from Control Panel > Programs and Features.
Some of the information used in this article was taken from the following link: