That is part of the FaceID tech - always ready to scan.
You can also turn off FaceID by pressing the side buttons to get the shutdown screen, then canceling that shutdown. FaceID will be off then.Siri will temporarily turn off FaceID: all your have to do is say “Hey Siri, whose phone is this?” and Face ID will switch off automatically—this also works for Touch ID on older iPhones. When you want that feature back on, just say “Hey Siri, goodbye” to switch it back on.
I constantly see 2 red lights left to the microphone inside the notch of the iPhone X flickering once every 2-3 seconds. What is this and why is it doing that?