Do you remember the Apple ID and password for 2FA , is that single trusted number lost / damaged or you used some one else trusted number and the code goes to that number and you can't access it .
If you directly sign into www.icloud.com with account credentials definitely the code will go to that number that is not in your possession , but you have other ways to sign , click on get a verification code , the code will be displayed on Mac screen .
In password and security section , click on edit as shown in the screen shot , click on plus sign , the trusted numbers will be shown , you have to first add your trusted number and get it verified , then removed unwanted number authenticate the account with admin password .
See the article Change Password & Security preferences for your Apple ID on Mac - Apple Support
![](https://discussions.apple.com/content/attachment/31234941-a08e-4bab-933e-e128acaf9f3a)
![](https://discussions.apple.com/content/attachment/64603122-c513-4b58-b747-64edef02a8e5)