Unfortunately no. You will need to reset it. Youn recover your data from backups if you made them.
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 How to remove your iPhone, iPad, or iPod touch passcode without a computer - 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