you will need to do a forced restore on iphone to resovle the iphone passcode lost problem. but when you do a forced restore on iphone, you will wipe all content from the iphone. To do a forced restore hold the HOME button, then connect to the USB cable and continue holding for a LONG time (a minute or more). Once iTunes responds release the button and your iphone will be restored.
or you can try to plug it into iTunes with it at the unlock screen. Somewhere it should say “Unlock your iPhone” or something like that in iTunes. Click it. Otherwise do a restore by going to the screen where it shows how much memory you have used up in iTunes and click “Restore”. Restore it as a new device (not from back up) in iTunes. After that, you can just sync your media and apps back onto it.
I’m happy to assist further over the phone at https://www.6ya.com/expert/joe_8b8c2cd6ce148309