IPhone cannot be sync error -54
I have a manual back up of my IPhone 11 on my laptop (windows 10). I have an old IPhone 7, which i had forgotten the password and was locked out. I tried to reset it back to factory settings using the same laptop. Itunes extracted the old software and installed the new software but never gave the option to reset it to factory settings, and it is still asking for the password which i have forgotten. Now when i connect my IPhone 11 to the laptop to sync it, the error -54 pops up. Would appreciate if anyone knows of a fix for this. I have already uninstalled and then reinstalled Itunes and also powered off and then powered back on the iphone, but the error is still there.
Windows, Windows 6