Usually, a device suggests setting up Face ID during the iPhone setup. If you didn't do it, go to Settings -> Face ID & Passcode -> Set up Face ID, then follow the onscreen instructions.
It is also possible to set up an additional appearance for Face ID to recognize. For example, when your glasses are on. For this, go to Settings -> Face ID & Passcode -> Set Up an Alternate Appearance. Simply follow the onscreen instructions after this.
If you have physical limitations, you can tap Accessibility Options during Face ID set up. In this case, you will not be asked for the full range of head motion when setting up facial recognition. Face ID is still secure to use, but more consistency is required in how you look at iPhone.
Face ID can also be used by people who are blind or have low vision. To set up Face ID to not require that you look at iPhone with your eyes open, go to Settings -> Accessibility, then turn off Require Attention for Face ID. This feature is automatically turned off if you turn on VoiceOver when you first set up iPhone.
Overall, it's cool and nice feature, which you should look at if your device supports such technology.