Are you signed into iCloud on any other device or computer? Because they would also be capable of receiving a verification code. If not, then Apple provides two recommendations for your situation:
If you can't access any of your devices, you can also try to reset your Apple ID or password from a friend or family member’s iPhone, iPad, or iPod touch. Open the Find My iPhone app. If a Sign In screen appears, tap Forgot Apple ID or Password, then follow the onscreen steps. Don't see a Sign In screen? Tap Sign Out, then choose Forgot Apple ID or Password
or
Will you soon have access to the trusted device that displays the verification code that’s required to sign in? If so, don’t use account recovery. It’s usually faster to wait until you can access a trusted device than to wait for account recovery.
If you cannot do either of those two things, you may need to start the account recovery process which can take a while to complete:
Recover your Apple ID with two-factor authentication account recovery - Apple Support
It is really critical to keep your Trusted phone numbers up to date, and you should always try to provide a phone number that you would continue to have access to if possible (like a landline). The phone number does not have to be one that belongs to you. You can add your Mom's number, for example. Just make sure you always have a number that will always be available, and be sure to keep the numbers updated.
Cheers,
GB