You may wish to find out why it is failing that many times. This may just keep on happening until you resolve that issue.
As for resetting it, see this Apple Recommended (an older forum system whereby Apple officially designated a reply as likely containing a solution) reply by ASC contributor Eric Root:
Too Many Codes Sent - Apple Community -- "Normally, the wait time is 8 hours after the last notification."
and:
unable to get verification code for apple ID.
unable to get verification code for apple… - Apple Community
If you can’t sign in, access a trusted device, reset your password, or receive verification codes, you can request account recovery to regain access to your account. This article explains how to recover your Apple ID after a waiting period - How to use account recovery when you can’t reset your Apple Account password - Apple Support