Because the iPhone X series do not have a home button, these devices require you to hold two buttons to display the power off options.
This can be done by:
Press and hold the Volume Up and the Side buttons at the same time
The power off options will then be displayed.
Slide from left to right on the slide to power off option to switch your device off.