https://support.apple.com/en-us/HT208108
Safety
iPhone and the TrueDepth camera system have been thoroughly tested and meet international safety standards. The
TrueDepth camera system is safe to use under normal usage conditions. The system will not cause any harm to eyes or skin, due to its low output. It's important to know that the infrared emitters could be damaged during repair or disassembly, so your iPhone should always be serviced by Apple or an authorized service provider. The TrueDepth camera system incorporates tamper-detection features. If tampering is detected, the system may be disabled for safety reasons.
When viewed through certain types of cameras, you may notice light output from the TrueDepth camera. This is expected as some cameras may detect infrared light. Some may also notice a faint light output from the TrueDepth camera when viewed in a very dark room. This is expected in extremely dark settings.