As per this article https://support.apple.com/en-in/HT204915
What to remember when you use two-factor authentication
Two-factor authentication significantly improves the security of your Apple ID. After you turn it on, signing into your account will require both your password and access to your trusted devices or trusted phone number. To keep your account as secure as possible and help ensure you never lose access, there are a few simple guidelines you should follow:
- Remember your Apple ID password.
- Use a device passcode on all your devices.
- Keep your trusted phone number(s) up to date.
- Keep your trusted devices physically secure.
Trusted phone numbers
A trusted phone number is a number that can be used to receive verification codes by text message or automated phone call. You must verify at least one trusted phone number to enroll in two-factor authentication.
You should also consider verifying an additional phone number you can access, such as a home phone, or a number used by a family member or close friend. You can use this number if you temporarily can't access your primary number or your own devices.
Did you added any additional numbers in the initial stage of creating 2FA like another mobile number or landline number , in case the code can be received on that numbers otherwise see this article https://support.apple.com/en-in/HT204921
Take help from apple care senior advisor see this link https://support.apple.com/en-in/HT201232