For iPhones with a notch:

To power off the device, press and hold the Side button and either Volume button at the same time. When the overlay appears, swipe right on the slide to power off control.

For iPhones with a Home button:

To power off the device, press and hold the Side button. When the overlay appears, swipe right on the slide to power off control.