Chosen Solution

I have an iPhone 7 Plus 128gb A1784 that after a really bad drop had a destroyed screen, when it was turned on the rear camera unit would overheat, also the portrait mode in the photo app wasn’t functioning and the front camera would only show a black screen, but the phone was still working fine, so, having bought a screen and front and back camera, I tried to replace them, but trying to boot the iPhone I would only get a bootloop, then I tried restoring, and iTunes gave me error 4013, as I said earlier, I doubt that could be the motherboard because the phone, before the replacing of the screen and front and back camera was still working so I really don’t know what could be the issue.

Try restoring without front and rear camera plugged in maybe?

Sometimes a force restart fixes things like that for me: Press and hold both the Side and Volume Down buttons for at least 10 seconds, until you see the Apple logo. Also, make sure you’re using an original Apple cable. I’ve had some strange iTunes and Photos syncing problems when using third party cables. If it still doesn’t work, I would probably try putting the original screen back on to see if it at least boots with that one (assuming the LCD can still show an image), or try another screen, ideally an OEM display.