A family of Microsoft word processing software products for creating web, email, and print documents.
Ugh, that one's annoying, but it's fixable.
First, try the sign-in again and when it asks where to send the code, look for "Use a different verification option" or "I don't have any of these". If you ever added a phone number to the account, you can get the code by text instead.
If there's no other option, use Microsoft's account recovery form at account.live.com/acsr. Fill it out on the computer you normally use and from home, since that helps them recognize you. Put in as much as you can remember: old passwords, subjects of recent emails, when you bought Microsoft 365. They'll reply to whatever new email you give them on the form.
Once you're back in, go to account.microsoft.com, then Your info, then "Edit account info" (or "Manage how you sign in"). Add your new email, make it the primary alias, and then remove the old one. From then on all the codes go to the new address.
Also, if your Word files are saved on your Mac itself (Documents or Desktop), they're still there. Open Finder and search for the file name. Even without signing in you can usually at least open and read them.