Because you are running a system prior to iOS 13.4, read this Apple Support document about what to do if you forgot the passcode on your iPhone, or your iPhone is disabled. Click here then select your device type if necessary --> If you forgot your iPhone passcode - Apple Support - Also has links for what to do for an iPad or an iPod touch.
This will erase the device. You can restore your device from a backup but the backup has to date from before you set the forgotten passcode or it too will be restored.
On the contingency you are asked for your Apple ID and password AND you have forgotten those:
If you forgot your Apple ID, click here --> If you forgot your Apple ID email address or phone number - Apple Support
If you forgot your Apple ID password, click here --> If you forgot your Apple ID password - Apple Support
To jump directly to the site to help you recover forgotten account information, click here -->- http://iforgot.apple.com/
What to do after [or before] you change your Apple ID email address or password - What to do after you change your Apple ID or password - Apple Support
If you still need help:
- Contact Apple for help with Apple ID account security "This article provides country-specific Apple Support contact information for customers seeking help with their Apple ID password or other security-related issues." - Contact Apple for help with Apple ID account security - Apple Support