You cannot bypass the passcode once it is setup to be used. What you can do is reset the passcode. In the process of resetting the passcode, all your data, on the iPhone, will be deleted. Once the password has been reset, then you can restore your iPhone from a backup file that you may have created on iClod or on a computer. Detailed response below.
——-
I understand that you are referring to the passcode that is used to get to the Home Screen of your iPhone. You will have to reset the passcode to your iPhone by following the instructions in this guide published by Apple 👉 Reset the Passcode of your iPhone (Without a Computer). Note: All the data on your iPhone will be erased.
Hopefully, you have a backup created on 👉 iCloud and/or on a computer. If you do then, you can 👉 Restore your iPhone from the backup file once your passcode has been reset and the iPhone has been returned to factory settings by the procedure in the link above.
Axel F.