Two-factor authentication for Apple ID - https://support.apple.com/HT204915 "You can manage your trusted phone numbers, trusted devices, and other account information from your Apple ID account page." --> https://appleid.apple.com/
To see how to 'Get a verification code and sign in with two-factor authentication', click here --> https://support.apple.com/HT204974 - "Whenever you sign in with your Apple ID on a new device or browser, you'll confirm your identity with your password plus a six-digit verification code. There are a few ways you can get a verification code. You can use the code displayed on your trusted device, get a text or phone call, or generate a code from your trusted device." Instructions at the end about what to do if you don't have any other trusted devices and need to use account recovery.