You can turn off the flashlight on an iPhone in two different ways, by swiping to the Control Center or (partially) swiping ...
If you have the standard variant of an iPhone, including the new iPhone 17, you won't be able to use the flashlight beam ...