Hey sheheryar666,
If we understand correctly, you are being asked to restore the iPhone to factory settings because iTunes cannot read the iPhone. One thing you can do is to make a backup of the iPhone using iCloud to keep your photos and stuff safe. Once your data has been backed up, you should follow the steps to get iTunes and the iPhone communicating properly.
How to back up your iPhone, iPad, and iPod touch with iCloud
- App data
- Apple Watch backups1
- Device settings
- Home screen and app organization
- iMessage, text (SMS), and MMS messages2
- Photos and videos on your iPhone, iPad, and iPod touch2
- Purchase history from Apple services, like your music, movies, TV shows, apps, and books3
- Ringtones
- Visual Voicemail password (requires the SIM card that was in use during backup)"
What does iCloud back up?
If your computer doesn't recognize your iPhone, iPad, or iPod
Please don't hesitate to let us know if you need additional assistance.
Thank you for using Apple Support Communities. Have a good one.