Hello,
What you are seeing is discussed in this Apple article: Get a verification code and sign in with two-factor authentication - Apple Support
With two-factor authentication you may need to verify your identity using a trusted device generating a verification code when trying to conduct certain activities. If you use iOS 11.3 or later on your iPhone, you might not need to enter a verification code. In some cases, your trusted phone number can be automatically verified in the background on your iPhone. Enter the telephone number as requested by the hint.
The article also describes other ways to verify with a trusted device or an Account Recovery Contact.
If you find you can’t sign in, reset your password, or receive verification codes, you can request account recovery ( How to use account recovery when you can’t reset your Apple ID password - Apple Support ) to regain access to your account. Account recovery might take a few days or longer, depending on the specific account information you can provide to verify your identity.
To edit your list of trusted items refer to the section: About trusted phone numbers and trusted devices in the document Two-factor authentication for Apple ID - Apple Support
To see, add, or change your trusted phone numbers:
- On your iPhone, iPad, or iPod touch: Go to Settings > your name > Password & Security. Next to Trusted Phone Number, tap Edit.
- On a Mac: Choose Apple menu > System Settings (or System Preferences), then click your name (or Apple ID). Click Password & Security, then add or remove a trusted phone number.
- In a web browser: Go to the Account Security section of https://appleid.apple.com/