Face ID works fine for most users, but there are exceptions. Some people have enough problems with technology.
If you are one of these users, there are two ways to solve the problem. Help Face ID set itself up or reset Face ID completely. See below for how it's done.
How to improve Face ID
Face ID is designed to re-learn after every failure. The next time Face ID doesn't recognize your face, just enter your passcode right away. This will convince the system that you are the owner of the phone, just look a little different this time or are in a different place. Ideally, when you enter your password, Face ID will take your face data and integrate it into the saved model.
Here's a quote from the Face ID security document:
If Face ID does not recognize you, but the similarity is great, and you immediately enter the password, the system will scan your face again and create a new, slightly modified, mathematical model of the face.
How to reset Face ID
If you're having too many problems with Face ID, you can set it up again. First you need to reset all its settings. This will delete the saved face model and all other Face ID information.
Step 1: Go to Settings-> Face ID & Passcode-> Reset Face ID.
Step 2: You will see the same screen where you set up Face ID for the first time. Try to adjust in good lighting this time.
Step 3: Press Start and move your head in a circle. Try to stretch your neck as much as possible and scan your face from all angles. Move your head more slowly the second time.
When Face ID is set up again, wait a couple of hours for it to remember you and get used to the environment.
Also Read: 10 Face ID Tips for iPhone X Owners