I assumed 2D because he mentioned Line2D, but with 3D things aren't so different, in fact you have more options because you're in 3D.
- use sprite textures as muzzleflash which is a old technique, if combined with shaders it looks reasonable good.
- Simulate 3D particles to make gunshot effects, can be done with sprite texture particles for example.
- Create a 3D mesh of the muzzeflash of the gun and apply volumetric materials or simple bloom-like shaders.
- Play videofootage of vfx (video special effects) assets as a sprite texture, but require extra work to make it look good in 3D.
There are many techniques one can use to make beautiful vfx effects, I would recommend to watch how other games do it. Simple pause a gameplay video on youtube for example, and you can study the effects by moving frame by frame, the effects look complex during gameplay but actually are really simple.