Do you have any trusted devices?
Based on: Get a verification code and sign in with two-factor authentication - Apple Support
A code is sent first to your trusted devices (some other Apple computer or Apple mobile device signed in with your account) automatically. If you have a trusted device running iOS 9 and later, OS X El Capitan and later, iPadOS 13 and later, or watchOS 6 and later, the verification code is displayed automatically on your trusted devices.
Contact Apple. Refer to this page for Apple Support for different countries ➔
Choose your country or region - Official Apple Support
Select your country (if you do not see your country, also look for "other" in regions; e.g., "Other Africa"), then "Choose a product". Click the "show" item under each category for more selections. 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.
If after all that you still can’t receive verification codes, you can request account recovery to regain access to your account [ How to use account recovery when you can’t reset your Apple Account password - Apple Support ]. Account recovery might take a few days or longer, depending on the specific account information you can provide to verify your identity.