Here I am going to tell you all your solutions to get rid of flashlight not working on iphone. Simply you can read and apply all the tricks:
Turn off the Camera App
Toggle the Flash on the Camera App
Reboot your iPhone
Adjust your Flashlight Brightness Level
Disable iPhone Low Power Mode
read also: how to remove all contacts from iphone