When you set up any multi-factor authentication (MFA) option, you have the option to generate a recovery code.
After you click Generate recovery code, your screen will look like the one below. Keep this code in a safe place. (If you download a copy, a PDF is created.)
Later, if you are unable to use your existing MFA option(s), you can use the link at the bottom of this screen to complete sign-in:
NOTE: A recovery code can be used only once. Each time a recovery code is used, a new code is issued, and the original code becomes invalid.