There are three major components that make Face ID possible, infrared camera, dot projector and flood illuminator. The latter two are in the center Dynamic Island. However the infrared camera is hidden under the OLED display in the upper left corner.
This new arrangement of the infrared camera allowed the Dynamic Island to be smaller in overall size. The individual OLED pixels over the IR camera are arranged to allow infrared light light to pass through the display. It’s being noted by multiple sources that some screen protectors may interfere with the infrared light and cause issues for the IR camera.
If Face ID is working under specific conditions and not others, such as failing only in dark settings, I’d suspect the screen protector may be interfering with the IR camera. Try holding the iPhone at different distances and/or different angles. It may also be necessary to remove the screen protector for testing as well.