Do you have 2 factor authentication turned on? If you do, then Apple can call you, email you or text you that code as many times as needed, using either the phone number or email address you gave to them… in addition if you have an iPhone or iPad, it can be used as a trusted device to help with this… otherwise… go here… —> Apple ID - Official Apple Support
john B