Flashing of the phone does at that stage if the phone is working slow or completely break due to its firmware. So at that moment, you will need to hard flash your phone by using its latest firmware.
If you will successfully flash your phone, it will be restored in its original settings and you will lose your data. So before flashing, you must need to take a backup of your data.
Otherwise, you will lose it and the phone will be restored in its original settings. You can safely recover your backup data to your phone after successful flashing. Now follow provided links below to get the latest firmware of iPhone 4s.
Model Number: iPhone 4s
Firmware version: iOS 9.3.5