Hey there Matinxsmax,
Thanks for reaching out to the Apple Support Communities. Just to confirm, is this issue only occurring when trying to use the flashlight from the Lock screen, or do you have issues with activating the flashlight from the Control Center or if you ask Siri to turn on the flashlight?
Since the issue started, have you tried restarting your iPhone to see if that's able to help with the issue, even if it's just temporary?
If not, give that a try using the steps below from the following resource: Restart your iPhone - Apple Support
How to restart your iPhone X, 11, 12, or 13
1. Press and hold either volume button and the side button until the power-off slider appears.
2. Drag the slider, then wait 30 seconds for your device to turn off. If your device is frozen or unresponsive, force restart your device.
3. To turn your device back on, press and hold the side button (on the right side of your iPhone) until you see the Apple logo.
While restarting may seem like a simple step, it can often help with resolving unexpected issues like this.
Keep us updated on the results.
Take care!