iPhone is supported by worlds most efficient and strongest OS that is IOS. IOS Generally does not gets frequent software issues like android. But some time it crashes and we need to restore its firmware. You can do that very easily using iTunes.
How to change firmware?
Firstly you have to download appropriate firmware for your phone. do remember while downloading firmware double check the firmware whether it supports your phone or not.
Go to genuine sites and download firmware for your device!
Step 1: Select the platform of your device.
Step 2: Select your device. Remember some device have different firmware according to their region.
Step 3: Click on the latest version of your firmware.
Step 4: Check whether the firmware is restorable by iTunes or not and download the firmware.
After downloading firmware download the latest version of iTunes or update your iTunes to latest version.
Step 4: Now turn of find my device on your iPhone.
You can do this by going to settings and clicking on your iCloud profile at top. After that navigate to find my device option and turn of it by confirming your security key.
Step 5: Now, open iTunes and connect you phone and have a backup.
Step6: Now click shift and (backup / restore) and select the firmware you downloaded.
If you select backup it will just backup the firmware and you internal contents will be as same.
if you select restore it will completely wipe your iPhone and i prefer this one.
Your phone will show apple logo screen for a while and it will reboot by itself.