Asking to resend a code for two factor authentication not working.

I tried to set up two factor authentication on my phone recently and wanted to see if I hit the resend code multiple times if it would flood my phone because why not.

However upon asking to resnd the code I did not get a new code so I put in the code I got and it said it did not recognize the code. Tried a second time with the same results.

It did work when I did NOT ask for a new code.