Restore data in iPhone
You can do it from a previous backup saved in your computer (where is located iTunes) or from an iCloud backup. 
Both the procedures can be done if and only if you previously completed a backup.

Restore from an iCloud backup


On your iOS device, go to Settings > General > Software Update. If a newer version of iOS is available, follow the onscreen instructions to download and install it.
Make sure you have a recent backup to restore from.
On your device: Go to Settings > iCloud > Storage > Manage Storage, then tap a device listed under Backups to see the date and size of its latest backup.
In the Setup Assistant, proceed to “Set up your device,” tap Restore from a Backup, then sign in to iCloud.
Proceed to “Choose backup,” then choose from a list of available backups in iCloud.