If iTunes Not Working Half Way
It stands a good chance that iTunes is not working in the half way, like iTunes freezes or become unresponsive, iTunes Wi-Fi sync stops working, iTunes not downloading purchases any more, etc. Try the following fixes:
Head to Library > Application Support > Sync Services > Trash Sync Services;
Create a new user account on your Mac/PC and reconnect to iTunes again;
Upgrade iTunes to the latest version; Turn off and on the Wi-Fi connection on both iPhone 8 and computer.
Access to iTunes on PC > sign in iTunes Store > click "Account" under "Qick Links" and sign in > find "iTunes in iCloud" and tap "Hidden Purchase".
If iTunes Backup is Corrupt or Unsupported
Anything unexpected might happen now and then, like your iTunes tells you that it can't restore and export photos to iPhone X/8/Plus from a backup because the backup is corrupt or unsupported. What's your plan? Well, you just cannot use that backup any more. All you need to do is to use an iTunes alternative to copy photos to iPhone 8/iPhone X from another backup like PC backup.
MacX MediaTrans can help you import photos to iPhone 8/X from another backup (macOS/Windows backup). To be specific, it can bulk transfer photos to iPhone 8 from Mac/Windows at No.1 fast speed, 8 seconds to transfer 100 4K photos to iPhone 8. What's plus, it can also bulk export/delete iPhone photos, sync iPhone video, manage iPhone music, remove DRM from iTunes purchases, convert M4V to MP4, M4B/M4P to MP3, make any song iPhone ringtone, etc.
Secure Download
Secure Download
If iTunes is Okay, Just No Enough Disk Space
Don't blame it on iTunes if there is nothing to do with iTunes. Sometimes that you could not restore photos to iPhone 8/iPhone X from iTunes backup is just because there is no enough disk space on your Mac/PC. On this occasion, free up some space on Mac or Windows PC. If you still receive the disk-space error alert after space cleaning, contact Apple Support please.
If an Unknown Error Occurs
Considering your iPhone 8, iPhone 8 Plus or iPhone X is armed with the latest iOS 17 operating system, the potential responsibility of iOS version narrows down to zero. So the possible culprit is the iTunes. Uninstall iTunes and install iTunes with the latest version on your computer. If it's still out of work, restore and transfer photos to iPhone 8 from iCloud backup.