Consider installing the official Microsoft Authenticator app on your smartphone. The Authenticator app is not required, but it is very easy to configure and use, and it is the recommended alternative to SMS text-based authentication. This app provides a number of methods you can use with multi-factor authentication and it can even provide codes for verification use when you do not have cellular or wireless access.
Refer to Microsoft's useful guides for full details about installing the app and adding your account(s):