Re: "Unable to sign in to Apple Account due to 'Too many codes sent' error"
Seems the code always goes to the old phone's number ?
Wondering whether or not you have a trusted computer or other trusted device (iPad. Watch) on which to receive a verification code to use to enter into the new phone to complete sign-in to your Apple Account.
More info: About trusted phone numbers and trusted devices for Apple Account - Apple Support
and
to use a code from another trusted device to sign in on your phone:
See how to: Get a verification code and sign in with two-factor authentication - Apple Support
_____________
As a last resort:
There is always an account recovery process:
From the linked article above about "trusted" numbers / devices:
Eg; says:
"If you permanently don’t have access to either your trusted devices or your trusted phone number, you can still attempt to recover access to your account.
- Try to sign in to your Apple Account.
- Select “Didn’t Get a Code?” or “Can’t get to your devices?” on the verification code screen.
- Choose “Can’t use [phone number]”.
- If you don’t have access to any trusted phone number on file with your Apple Account, you can initiate the process to recover access to your account. Follow the onscreen steps.
Account recovery may take a few days or longer, depending on the specific account information you can provide to verify your identity. Contacting Apple can’t help speed up the process."
____________
Important info. for successful account recovery:
See: What to expect during account recovery - Apple Support