As with many things on the iPhone, there's more than one way to skin a cat. Powering off the device is no different. If you are experiencing a problem with the side button on your iPhone, or you cannot press a physical button, the device can be shut down using only touch gestures. To prevent an accidental shut down, the power off feature is somewhat hidden.
Once the iPhone is switched off, it can be restarted without using the side button as well. Simply plug the iPhone into a charger with a Lightning cable and the device should boot up.