Hello,
Sometimes, verification codes can be blocked by your mobile service provider. Contact them to see if they’re blocking text messages, especially the ones from short codes, and ask them to unblock it if they are.
Check Microsoft Account on another device: Try to access your Microsoft account from a different device to see if you can receive the verification code there.
Email Recovery Key: If the recovery key was saved to your Microsoft account, you can access it by visiting the address account.microsoft.com/devices/recoverykey.
Best Regards,
Hania Lian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.