Follow these instructions:
If you see an iPhone or iPad unavailable message or Security Lockout screen - Apple Support
If you have a Mac or PC, it might be easier to follow these instructions:
If you forgot your iPhone passcode, use your Mac or PC to reset it - Apple Support
In either case, your phone will be erased and you will have to set up the phone again. There is no way to avoid this. If you have a backup of the phone, you can use that to restore data back to the phone.