Are you trying to sign into your account of a new device? If yes, it is sending a code to your trusted device or trusted telephone number. You then need to enter the code into the device into which you are trying to sign in. If you aren't receiving the codes then verify you are using a trusted device or number. You can only enter a code request a certain number of times before the system thinks you are messing with it and then you have to wait until Apple will let you try again.
You may also wish to read the articles 'Two-factor authentication for Apple ID' ( https://support.apple.com/HT204915 ) and 'Get a verification code and sign in with two-factor authentication' ( https://support.apple.com/HT204974 ). Various sections contain information that is useful in understanding about the trusted devices (an iPhone, iPad, or Mac that Apple knows is yours) system, and how to get a verification code on a trusted device or at a telephone number.
Apple Recommended (an older forum system whereby Apple officially designated a reply as likely containing a solution) reply by ASC contributor Eric Root:
https://discussions.apple.com/thread/252896931 -- "Normally, the wait time is 8 hours after the last notification."
and:
unable to get verification code for apple ID.
https://discussions.apple.com/thread/8004633
https://discussions.apple.com/thread/254489004