You could try a few things. Please note that some of the steps remove the data on your iPhone!
If you can't remember your iPhone passcode, you can erase your device using recovery mode:
- Using a Computer:
- Connect your iPhone to a computer using a USB cable.
- Open Finder (macOS Catalina or later) or iTunes (macOS Mojave or earlier, or Windows).
- Put your iPhone into recovery mode:
- For iPhone 8 or later:
- Press and release the Volume Up button.
- Press and release the Volume Down button.
- Press and hold the Side button until the recovery mode screen appears.
- In Finder or iTunes, locate your device and choose Restore.
- After the process completes, set up your iPhone and restore from a backup if available. Apple Support
Then you should be able to set up a new Apple ID:
If you're unable to recover your Apple ID, you can create a new one:
- Go to Settings > Sign in to your iPhone > Don't have an Apple ID or forgot it?
- Follow the on-screen instructions to create a new Apple ID.
If you want to reset your Apple ID password, you can do so on the official wesbite:
- Visit iforgot.apple.com.
- Enter your Apple ID email address.
- Since you don't have access to the trusted phone number, select "Don't have access to your trusted devices or can't receive verification codes?"
- Follow the prompts to verify your identity and reset your password. This process may take a few days, depending on the information you can provide. Apple Support
Once that is done you need to remove the activation lock:
Activation Lock is a security feature that prevents unauthorized use of your device. To remove it:
- If You Can Access Another Device Signed in with the Same Apple ID:
- Go to iCloud.com and sign in with your Apple ID.
- Click on Find iPhone.
- Select your device from the list.
- Click Remove from Account.
- If You Don't Have Access to Another Device:
- Contact Apple Support for assistance. They may require proof of purchase to verify ownership. Apple Support
I hope this helps you regain access to your iPhone.