Hi @Charlean Baxter , it depends on whether your account is a personal account or a work/school one.
For a personal Microsoft account, sign in at account.microsoft.com/security and go to "Manage how I sign in".

You can add and remove verification methods there. Heads up though, Microsoft has stopped letting you add phone numbers as a new verification method on personal accounts, and they're phasing out SMS altogether. So you'd add an email address, an authenticator app, or a passkey instead, then delete the old number.

If the number is what you actually sign in with (an alias rather than a security method), that's managed separately at account.live.com.
For a work or school account, it's mysignins.microsoft.com/security-info. Add the new number, then remove the old one. An admin can also change it from the M365 admin center under Users > Active users > Manage contact information.

If you can't get the code because the old number is dead, click "I don't have any of these" on the verification screen, and it'll walk you through other options. Fair warning: if you end up replacing all your security info, there's a 30-day lock on security changes afterwards.
Whatever you do, add the new method first and confirm it works before deleting the old one.
If this solved your problem, kindly click Accept Answer. Thank you