People often fail to realize that companies, like mine, sometimes use IDs for signing-in that differ from their public email address (both are email addresses). Making them different makes it a harder on hackers. Most companies make user IDs the public email address, but this just hands hackers 1 piece of a puzzle with which to try to gain access.
When hackers enter in a non-existent user ID into Microsoft email sign-in field, Microsoft sees it's an email addy, but it's not proper as a user sign-in ID. The hacker is asked to "sign in another way" with a PIN, face, fingerprint, password, or "send a code to {email address}." So, they click "send an email" and MS sends that "Your single-use code" to the email address the hacker entered as a user sign-in. So, in my users' cases, because the public email address the hacker tried as a user sign-in ID does exist, then my users sometimes get these single-use code emails.
Anyways, these "single-use code" emails are typically harmless. If the hacker doesn't have access to your inbox, he/she cannot get the code that's needed to complete a sign-in.
In any case, you should turn on multi-factor authentication if you have not aleady!!!
You can always check your security by clicking your avatar > MY MICROSOFT ACCOUNT > in left pane click SECURITY > VIEW MY SIGN-IN ACTIVITY. Don't freak out if you see a lot of failed attempts to sign in as you; there are a lot of bots out there on servers throughout the work that just hack away on known email addresses all day long by using with random passwords and/or by modifying old leaked password databases' passwords (so yeah, don't change your password from HappyDay1 to HappyDay2 or JoyfulDay3 because it's common strategy to just modify logically, especially incremental numbering, particularly years! And don't use family member names because that is super common usage and hackers comb your social media to see who's your family members). If your sign-in activity page is blank, like mine today, then congratulations! You might want to play the lottery today :-) Either that, or no one cares about you... hmm.. which is probably my case, LOL! Just kidding.
Have a great day!
john