Dear filipf_123
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
Based on your description, it seems that you can't sign in your office desktops applications and got error message. Please don't worry, we can work together to narrow down the behavior.
As you mentioned that, you can sign in the web version of office and if you using another local account , it also can work. Given this situation, to confirm if the behavior is related to the local environment, please try to disable your Antivirus and Firewall then to check the result
Proxy: Click on Settings > Network & Internet > Proxy
Toggle the option Automatically detect settings to ON.
Toggle the option Use a proxy server to OFF.
Firewall: you can refer to how to turn off the firewall on Windows.
Meanwhile, please try the following steps to check the behavior:
1. Go to Windows settings>Accounts>Access work or school>find the work account then Click Disconnect>then reconnect the account to check the behavior.

2. Use online repair tool to repair office then to see the result, for your reference: Repair an Office application (microsoft.com)
3. Open Office in clean boot to see if the other programs caused the problem, you can refer to How to perform a clean boot in Windows (microsoft.com)
Besides, to help us narrow down the behavior, we would like to collect more detailed information about the situation you are experiencing so that we can have further investigation:
Does other users in your organization also experienced the same behavior?
Can you tell us your office version? Go to Control Panel\Programs\Programs and Features>find the office you have then tell us the version

And can you share the screenshot of the error messages you got to us so that we can have a further investigation?
We’re looking forward to your reply and will continue to help you all the time! If there are any misunderstanding or unclear, you can post back in your free time.
Your understanding and patience will be highly appreciated. I hope that you are keeping safe and well!
Sincerely,
Stacey | Microsoft Community Moderator