What is the secret of the mysterious red light at the top of the iPhone screen?

Some iPhone users have noticed a small red light flashing near the top of the screen, especially when using the phone in dark places. This scene has caused concern for some, as they may think that there is a problem with the device or that an application is turning on the camera or recording something without their knowledge. But the truth is that this light is linked to a basic technology in the phone, which is the Face ID system.
The reason for the appearance of light is due to the infrared sensors located within the TrueDepth front camera system. These sensors scan the user’s facial features and create an accurate map that helps the phone verify the identity of its owner and unlock the device safely.
Since infrared radiation is usually invisible to the human eye, its appearance as red light may be surprising when seen in certain circumstances or through some cameras.
The red light cannot be completely disabled, as it is linked to important functions such as Face ID, the proximity sensor and some attention recognition features. But the user can reduce his appearance times by turning off some features that make the phone repeatedly search for the presence of the user’s face, such as the “conscious attention” feature. To turn off this feature, you can go to Settings, then choose Face ID.
After entering the passcode, you must disable the “Mindful Attention Features” option. However, this procedure results in the loss of some functionality that depends on the phone knowing that the user is looking at the screen. (Erm News)