The best material is SLA resin or PLA with 100% infill (set high number of perimeters).
Print the middle part with flexible filament, glue everything together with superglue. Use a color change or cut the bottom part to make it transparent.
The best transparency can be achieved with SLA transparent resin or non-3D printing method.
Treat the thread with silicone grease, don't forget to use a proper sealing between parts. I suggest using O-rings but soft gaskets also work fine.
The cover fits this flashlight: https://www.aliexpress.com/item/1005001839188982.html?spm=a2g0o.productlist.0.0.a36a6035dXgr4U&algo_pvid=7a59d7a1-ca51-4f82-9349-16de7df0469d&algo_exp_id=7a59d7a1-ca51-4f82-9349-16de7df0469d-0
Don't forget to read my article: https://blog.prusaprinters.org/watertight-3d-pr…ing-part-2_53638/
The author marked this model as their own original creation.