Based on: Get a verification code and sign in with two-factor authentication - Apple Support
A code is sent first via the Internet (not as a SMS text message) to your trusted devices (some other Apple computer or Apple mobile device signed in with your account) automatically. If you have a trusted device running iOS 11 and later, OS X High Sierra and later, iPadOS 13 and later, or watchOS 6 and later, the verification code is displayed automatically on your trusted devices.
The other standard way is receiving a text or phone call, but you say that device no longer exists.
If you had set up a recovery contact, read Get a recovery code for a friend or family member as their Apple Account recovery contact - Apple Support
If you can’t sign in or receive verification codes you can request account recovery to regain access to your account [ If you forgot your password and can’t sign in to your Apple Account - Apple Support ]. Account recovery might take a few days or longer, depending on the specific account information you can provide to verify your identity.
Here are links to posts by Community contributors which provide additional detail about the account recovery process and what to do if you do not receive a text or call: Activation Lockout Issues - Apple Community and How can I reset my Apple Account password? - Apple Community and How to delete Apple ID when you can't log… - Apple Community This thread outlines the multi-step process and final recovery —> My Apple ID is locked, how do I fix it? - Apple Community , and this one about things you should and should not do while waiting —> How can I recover my Apple ID after multi… - Apple Community This is a very long user contributed document about account recovery —> Apple Account Recovery: Complete Step-by-… - Apple Community