Welcome to Apple Support Communities!
You mentioned that your iPhone is on iOS 7.1.2. First, I'm wondering--are you using an iPhone 4?
I see that your iPhone is restarting and I'm happy to offer some troubleshooting steps for you to try. Since you're using iTunes, I'd recommend trying to 'update' your device using the following steps:
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.
Get more help
If you can’t update or restore your device with recovery mode, or you can't use recovery mode because of broken buttons, contact Apple Support.
These steps come from this support article: If you can‘t update or restore your iPhone, iPad, or iPod touch
While this article is about a slightly different issue, these steps can still help in your situation.
Let us know if you're using a different iOS device or you're not able to update iOS following the steps above.