Hey there boyce178,
Thanks for reaching out to the Apple Support Communities.
To get started, if unable to receive a verification code because you no longer have access to the trusted device, do you by chance have access to another Apple device that is still signed into your Apple ID? If so, you may be able to retrieve a verification code from another trusted device.
Check out this link for more details: Get a verification code and sign in with two-factor authentication - Apple Support
Get a code from Settings on your trusted device
If you can’t receive a verification code on your trusted devices automatically, you can get one from Settings, even if your device is offline.
From your iPhone, iPad, or Apple Watch
If your device is online:
1. Go to Settings > [your name].
2. Tap Sign-In & Security > Two Factor Authentication.
3. Tap Get Verification Code.
If your device is offline:
1. Go to Settings > [your name].
2. Tap Sign-In & Security.
3. A message says "Account Details Unavailable." Tap Get Verification Code.
From your Mac
1. Go to Apple menu > System Settings, then click your name.
2. Click Sign-In & Security > Two-Factor Authentication.
3. Click Get a Verification Code.
If you don't have access to another trusted device, then the next best option would be to go through the account recovery process once again: How to use account recovery when you can’t reset your Apple ID password - Apple Support
After you regain access to your account, be sure to then change the trusted phone number associated with your Apple ID to your new number so you can receive verification codes. This last resource has steps on how to update your trusted number under the "What is a trusted phone number?" section: Two-factor authentication for Apple ID - Apple Support
We hope that's able to help.
Take care.