You should have been able to restore the phone to a working state to be able to receive a verification code.
If you have a forgotten/unknown device passcode, or have a disabled device, unfortunately you have no option but to erase the device. However, you can eventually restore the data and settings from a backup you made before the device was disabled. You must have a computer to use the method below. If you don't have a computer, borrow one from a friend, or go to an Apple Retail Store or Apple Authorized Service Provider. You can also use a PC with iTunes. You will likely also need your Apple ID and password. All Apple mobile devices follow the same general procedure but the link below and other links off it provide model-specific instructions:
If you forgot the passcode on your iPhone", or your iPhone is disabled, click here --> http://support.apple.com/HT204306
Here is a related video which to me has more complete and clearer instructions: https://www.youtube.com/watch?v=7s8-zLG9ySQ
Steps:
1. With the device disconnected from a computer use the model-specific instructions in the links above to shut down the device.
2. Connect it to a computer with Finder or iTunes (Mojave or earlier, or PC).
3. Restart into recovery mode (black screen with a cable indicating attach to computer).
4. When prompted, click "Restore" to erase data & settings, and update system software. May take some time.
5. Set up your device ( https://support.apple.com/kb/HT202033 ). Partway through you are offered the opportunity to restore your data and settings from a backup, or you can do this at a later stage ( https://support.apple.com/HT204184 ). Even if you have no backup, if you were using some iCloud services to sync items such as Contacts or Photos those may reappear once you sign back into your iCloud account --> Set up iCloud on your iPhone, iPad, or iPod touch - https://support.apple.com/HT208681
'If your computer doesn't recognize your iPhone, iPad, or iPod' click here --> https://support.apple.com/HT204095
---
On the contingency you are asked for your Apple ID and password AND you have forgotten those:
If you forgot your Apple ID, click here --> https://support.apple.com/HT201354 ; your Apple ID password, click here --> https://support.apple.com/HT201487 , or to jump directly to the forgotten sign-in information help site, click here --> http://iforgot.apple.com/
What to do after [or before] you change your Apple ID email address or password - https://support.apple.com/HT204071
If you still need help, contact Apple for help with Apple ID account security --> https://support.apple.com/HT204169
If you are in the middle of Account Recovery: How to use account recovery when you can’t reset your Apple ID password - Apple Support
Check the status of your request
At any time, you can see how long it will be until your account is ready for recovery, or when more information will be available. Just go to https://iforgot.apple.com and enter your Apple ID.
"In some cases, you might be able to speed up the account recovery process or reset your password immediately by verifying a six-digit code sent to your primary email address. You might also be able to shorten the wait time by providing credit-card details to confirm your identity. If you’re given this option, an authorization request goes to the card issuer.*"