Once your phone becomes unavailable, your data is gone. You can restore your data from a backup once you have reset your phone.
If you forgot the passcode on your iPhone, or your iPhone is disabled or unavailable -
Click on the link for instructions on how to reset your passcode without a computer if you have iOS 15.2 or higher.
How to remove your iPhone, iPad, or iPod touch passcode without a computer - Apple Support If you see an iPhone or iPad unavailable message or Security Lockout screen - Apple Support
Click on the link for instructions on how to reset your passcode using a computer.
If you forgot your iPhone passcode - Apple Support If you forgot your iPhone passcode - Apple Support