Hi elaheh good morning.
What kind of Office 365 license you have? Keep in mind that not all the O365 licenses allow you to work with Desktop Apps.
If you have the right license, you can log out from office Apps. Also, you can check your work & School account and delete your office 365 account from there and login back.
If this can't work, I also recommend delete the cached credentials from Windows Security Vault and try again, but be sure you have the right O365 license.
Here you have more info, about O365 licenses.
Microsoft 365 with Office apps | Microsoft 365
I hope this can help.
Good luck!