Hello,
Welcome to the Microsoft Community.
Good afternoon. This scenario is expected, as Microsoft is gradually phasing out the feature that sends codes via SMS. The recommendation is to update your Microsoft account information, set up a secondary email, enable two-factor authentication, opt for "Passwordless login," and use the Microsoft Authenticator app for sign-in verification.