If the data on your iPhone gets erased, you can restore it if you have the data backed up on iTunes.
How Do I Restore A Backup From iTunes?
- Open iTunes on your computer.
- Connect your iPhone to your computer using a Lightning cable (charging cable).
- Select your iPhone when it shows up in iTunes.
- In iTunes under Backups, select Restore Backup...
- From the list of backups, select the one you want to use.
- Make sure the iPhone name is correct and click Restore.
- If your backup is encrypted, you'll be prompted to enter the password.
- Keep your iPhone plugged into your computer while the backup loads and while your iPhone reboots.
- When your iPhone has fully restarted, the backed up data has fully restored onto your iPhone and you can unplug your iPhone from your computer.