Put it in recovery mode.
If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
Try using a different computer for the restore.
When you try to update or restore your iPhone, iPad, or iPod touch, you may see one of these messages in iTunes.
You may see one of these messages if the device unexpectedly disconnects during the update or restore or iTunes couldn't tell the device to go to the restore state.
- The iPhone [device name] could not be restored. An unknown error occurred (4005).
- The iPhone [device name] could not be restored. An unknown error occurred (4013).
- The iPhone [device name] could not be restored. An unknown error occurred (4014).
Try these steps to resolve the issue:
- Install the latest version of iTunes.
- Restart your computer.
- Make sure your computer is up to date. If an update requires a restart, check for updates again after you restart.
- Restore using another USB cable.
- Restore your device on another computer.
If you continue to see error 4005, 4013, or 4014 when you restore your device, contact Apple for support.