Here you will find the ways to fix the iPhone flashlight not working.
So first remove the cover if you have covered your phone
Then switch off the low power mode
Always charge your phone
For alerts, check the LED flash.
Make sure your iPhone isn't very hot or cold.
Switch off the Light
Click on Forced App Closing
Update your iOS to the newest version 11. Force restart your iPhone
Reset every setting
Downgrade to a previous version of iOS 16
Restore the factory settings on your iPhone
Go Request Apple Support