If you were syncing Photos and Contacts with iCloud, have you signed into Settings/Your Name/iCloud using the same Apple ID, and turned syncing on? The iCloud sync is very, very slow and could take a couple of days or more. Photos can take even longer.
If you weren't syncing with iCloud, do you have a backup you can restore from? Restoring from a backup erases all data currently on your device. Any data newer than when the backup was made will be erased. A restore is an all or nothing restore. You can't access a backup and only restore certain files.
Backup - Restore your device from an iCloud or iTunes backup.