In general, this problem is caused by the hardware damage of iPhone. The most common problem is that the temperature detection element of the rear camera is abnormal. As a result, the actual temperature of the mobile phone is not high, but it is mistakenly thought that the temperature is too high, and the camera function is turned off. At this time, the flashlight will not work. If your mobile phone has been dropped recently, or a small amount of water has been injected, you should go to the after-sales inspection as soon as possible.
If it is really because the temperature is too high, such as running games for a long time, watching movies, or talking on the phone while charging, this will lead to an increase in the temperature of the mobile phone motherboard. Then you need to cool down as soon as possible to reach the normal working temperature of iPhone. But don't put the mobile phone in the refrigerator, it will damage the components of the mobile phone.