People used to turn off their iPhones simply by pressing the side button, but now with Apple changing the role the buttons plays, they’ll only activate Siri if holding and pressing the button. Luckily, you still can turn off your iPhone via a combination of buttons, and if you find it hard to remmeber the steps, there is other method for you as well. Here’s how.
Turn off iPhone with buttons

For iPhone X and later models, hold and press the side button and volumn up/volumn at the same time until the shutdown window appears. Then slide to power off your iPhone.
Models previous to iPhone X can be shut off either by holding the side button for a few seconds or pressing the top button until the slider appears.
Turn off iPhone in Settings
You can also shut off your iPhone without buttons. Go to Settings>>General, and then scroll down to the last, click Shut Down. Drag the slider to the right to turn off your phone.
Restart iPhone with buttons

How about restarting you iPhone? There are also several options. The first one is to press the volum up button once, and then the volumn down button once, and finally hold and press the side button until you see the Slide to Power Off slider. Continue pressing the side button, and the Apple logo appears on your phone, you’re done. Do remember these steps, as error during either of the steps may activate the SOS feature and automatically dial emergency services.
Restart iphone with Assistive Touch
If you feel uncomfortable with the restarting method above, Assistive Touch can be useful to you. It is not enabled by default, so you need to go to Settings>>Accessibility>>Touch>>Assistive Touch. Then, in the Customize Top Level Menu, replace any option with Restart as you want. Once it’s set, you can tap the AssistiveTouch button on your Home screen and restart your phone anytime, anywhere.