Click on this link to read what to do "If you forgot your Apple ID password" --> https://support.apple.com/HT201487
Read the article 'Two-factor authentication for Apple ID' (click here --> https://support.apple.com/HT204915 ) thoroughly. Various sections contain information that is key to you being able to set up and use a different telephone, Mac, iPad, or Watch to get a verification code you can use. You can also get one from an Account Recovery Contact. Failing that you can ask for account recovery.
"If your iPhone is your only trusted device and it is missing or damaged, you will be unable to receive verification codes required to access your account."
"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."
Read the sections about:
- Trusted phone numbers
- Manage your account. If you can still sign into your account, go to https://appleid.apple.com/ and add your new number, then sign out of iCloud and back in again on your devices.
- What if I can't access a trusted device or didn't receive a verification code?
And if necessary:
- If I can't sign in, how do I regain access to my account?
Get a verification code and sign in with two-factor authentication - https://support.apple.com/HT204974
Get a code from an Account Recovery Contact --> https://support.apple.com/HT212513
Recover your Apple ID when you can’t reset your password - "If you use two-factor authentication and can’t sign in or reset your password, you can regain access after an account recovery waiting period." - https://support.apple.com/HT204921