You will need to contact Apple Support directly to regain access to your account, if the 2-factor authentication code cannot be received.
You should never use your own number as the trusted number for codes, as that defeats the purpose entirely. The number should be one you have access to even if you don't have your iphone with you, or cannot actually access it.
It can be landline or even an android phone of a friend or relative. It just needs to be capable of receiving a code via SMS or voice call.
In any case, to access your account now, you will need to request an "Account Recovery" process from Apple.
click here ➜ How to use account recovery when you can’t reset your Apple Account password - Apple Support