Salutations Kevlagold,
Here’s information on setting up an account recovery contact Set up an account recovery contact
The last section of that article goes over how to get a recovery code -
How to get a recovery code from your recovery contact
If you forget your Apple ID password or get locked out of your account, just follow the steps on your device to share the onscreen instructions with your recovery contact in-person or on the phone. Your recovery contact then shares a six-digit code that you enter on your device. After your identity is confirmed, you can reset your Apple ID password.
Since you can select up to five recovery contacts for your account, if being able to connect with one of them via another contact method is a concern, choosing a contact that is nearby and you can work with in person may be beneficial.
Thanks.