Thanks for using Apple Support Communities. I see from your post that you updated your iOS software using iTunes and you're unable to complete the update.
You mentioned your iPhone 8 was restarting unexpectedly before you tried to update, which could be a factor. To help with a case like this, we have some great steps If you can't update or restore your iPhone, iPad, or iPod touch
Without knowing if you have a recent backup, it's recommended that you try the Update option first. Restoring will erase your iPhone and return it to factory settings, so you'd only want to do that after exhausting all other possibilities.
Put your device in recovery mode and set it up again
- Make sure that you're using the latest version of iTunes.
- If iTunes is already open, close it. Connect your device to your computer and open iTunes. If you don't have a computer, borrow one from a friend or go to an Apple Retail Store or Apple Authorized Service Provider for help.
- While your device is connected, force restart it with these steps, but don't release the buttons when you see the Apple logo, wait until the connect to iTunes screen appears:
- On an iPhone X, iPhone 8, or iPhone 8 Plus: Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the connect to iTunes screen.
- On an iPhone 7 or iPhone 7 Plus: Press and hold the Side and Volume Down buttons at the same time. Keep holding them until you see connect to iTunes screen.
- On an iPhone 6s and earlier, iPad, or iPod touch: Press and hold both the Home and the Top (or Side) buttons at the same time. Keep holding them until you see the connect to iTunes screen.
- When you see the option to Restore or Update, choose Update. iTunes will try to reinstall iOS without erasing your data. Wait while iTunes downloads the software for your device. If the download takes more than 15 minutes and your device exits the connect to iTunes screen, let the download finish, then repeat step 3.
- After the Update or Restore completes, set up your device.
I hope this helps to get your iPhone 8 back up and running.
Take care.