You can restore your device and remove the screen lock is to use the iTunes program.
1. Connect your phone to a synced computer via a USB cord. Open the latest version of the iTunes program on the computer;
2. If it's successfully detected by iTunes, hit your device icon and go to the Summary > Restore iPhone...;
3. Confirm Restore option and iTunes will start to restore your device and remove the screen password as well.
Or you can use iCloud to erase your device remotely.
1. Visit
www.icloud.com on the browser of your computer or iPad, etc. Log in your iCloud account with correct Apple ID and password;
2. Click on the Find iPhone option and choose your iPhone under All Devices list;
3. Press the Erase iPhone button and it will efface all the data on the device including the screen password.
Use some other
iOS system recovery software like TunesKit iOS System Recovery to remove 4-digit or 6-digit one, Touch ID, or Face ID.
The last possible solution introduced here is to try putting your iPhone into recovery mode and then use iTunes to restore iPhone and screen lock.
1. Connect your iPhone to the computer and launch iTunes (make sure it's the newest version);
2. Follow the guide from Apple Support to manually boot your device into the recovery mode, or use TunesKit iOS System Recovery to freely put iPhone in recovery mode in one click;
3. iTunes will detect your iPhone in recovery mode and ask you to Update or Restore it. Choose the Restore button and wait until the restoring completes. You will be able to set new passcode on iPhone.