With this method, you dont have to unlock your machine to control the flashlight.
Raise your iPhone or tap the screen to wake it and display the Lock Screen.
When the flashlight is turned on, youll see theFlashlightbutton highlighted on the lower left corner.

Mockupnest
Long-press (press and hold) theFlashlightbutton and then release to turn it off.
Depending on your prefs, you may also feel haptic feedback as you long-press the button.
Open theControl Centeron iPhone 15 by swiping down from the top-right corner of the screen.

iPhone 15 Action Button.Apple
When the flashlight is turned on, youll see theFlashlighticon highlighted just like on the Lock Screen.
Tap theFlashlighticon to turn off the light.
You should then hear and see that Siri has turned it off for you.

you could also use that icon to turn off the flashlight.
Select theDynamic Islandto expand it and youll see that theFlashlightisOn.
Tap theFlashlighticon to turn it off.

iPhone 15 Action Button.Apple
Apple
To assign the flashlight to the button, open theSettingsapp and selectAction Button.
Swipe to theFlashlighticon to assign the action.