To see how to 'Get a verification code and sign in with two-factor authentication', click here --> https://support.apple.com/HT204974
- Use a Trusted Device: Mac, iPhone, iPad, Watch. Code is either generated automatically or manually using Settings on the Trusted Device.
- Text or phone call to a trusted telephone number (any telephone; even landlines).
Are you sure you have entered the correct telephone number?
You're not doing anything unusual such as using a telephone number in a different country? (I believe that shouldn't be an issue but who knows?)
Contact Apple. Click here --> https://support.apple.com/choose-country-region Select your country, then a product. If you don't see one that handles your issue then keep experimenting with selections until you reach one that gets you a chat session or a telephone call and get the representative to redirect you.
or:
Contact Apple for support and service --> "See a list of Apple phone numbers around the world."
Click here --> https://support.apple.com/HT201232