Two-factor authentication "You have sent too many codes to verify your phone number." I recently tried to enable 2FA for iCloud - whenever I enter the code sent to my phone, it keeps telling me to try again. I've sent so many codes that it now says that it won't send me too many codes (as quoted in title). 

Why does this happen and how to fix? 

EDIT I kept getting "Try entering your verification code again." I discovered I reside in a country where 2FA does not apply. Rather strange that the Apple software does not recognize this and prompts me to keep trying.
Wait for 8 hours and then try again. If the codes dont work the 1st 2 times, click didnt receive code and try another offered method (like text me, call me, didn't receive code). It sounds like you have a software issue. Maybe a backup and restore can help in the long run, but for now just wait the 8 hours.