Thanks for letting us know about your Samsung Galaxy A52 having issues with Flashlight and we apologize for the inconvenience it caused you.
You can run a diagnostics test as follows:
To make sure your phone is in tip-top shape, you can run diagnostic tests in the Samsung Members app. They will walk you through key components on your phone and test them to see if they are working correctly.
First, ensure that your device is up-to-date with the latest Software updates.
Settings > About Phone > Software Updates > Download and Install > Follow On-screen instructions.
Step 1. Open the Samsung Members app on your phone, and then tap the Get help tab.
Step 2. Tap Diagnostics near the top of the screen.
Step 3. Tap on the individual icons (Select "Torchlight") to do each test separately.
Step 4. Follow the on-screen instructions.
For more assistance, you may contact us on our online Samsung support channels below.
If the problem persists, immediately bring your device to nearest Samsung Authorized Service Center.
Hope this content is helpful and your problem gets solved.