On Android 13 and above, the ability to adjust the brightness of the flashlight was implemented for devices with the appropriate hardware.
Assuming you have a recent Pixel, you can do this by using an app that uses the API that controls this.
This one should work fine for you:
https://github.com/cyb3rko/flashdim