Hello
Can you go online via web browser https://account.live.com, see if you can get through Security > Manage how I sign in. Then add new contact information/security verification method here, then remove the phone number that's outdated.
If you cannot get through Security because it wants to send the code to an outdated phone number still, look for an option like “Show more verification methods” to see if you have a backup (e.g., a phone number or alternate email).
If you don’t have access to any of the options listed, select “I don’t have any of these.” This will begin the recovery process. As part of that process, Microsoft will let you add new contact information — but only after a 30-day waiting period.
This 30-day delay is intentional. It’s a security safeguard designed to protect users in case someone else tries to hijack their account by changing recovery info. The wait gives the rightful owner time to notice and stop unauthorized changes.
Unfortunately, this policy cannot be bypassed. Microsoft documents it here.
=====================
I also want to bring this to your attention. For personal Microsoft accounts, Microsoft now says you can no longer add a phone number as a new security method. Their current support article states: “For increased security, you can no longer add a phone number” when adding a new way to verify sign-in.
See the first and last items in the gray text box. You will need to use the other methods provided.