Hello
Thank you for your question and reaching out. I can understand you are having query\issues related to Verification code.
Please try to Add or update security info
Sign in to your Advanced security options page using your Microsoft Account. https://account.live.com/proofs/manage/additional
Select Add a new way to sign in or verify then choose how you would like to receive security codes.
Note : The email or phone number does not have to be yours - you just need to have access to it if you want to use it to verify your account.
We'll send a security code to confirm. Enter that code when prompted and then select Next.
Reference :
That's it. Next time you need a sign-in verification code, you will see the new option listed.
--If the reply is helpful, please Upvote and Accept as answer--