Hello
When you said the correct number is listed in your account, are you referring to https://account.live.com > Your info > Sign in preference, if so, this list is alias/username, not security contact information.
To see where the code is sent to, you need to go to Security > Manage how I sign in. Make sure your phone number is listed there.