why does the fog in 3d view look better than in rendered result
The &quot;lines&quot; you see are the dynamic range and the bit depth of the color.
Are you using JPEG  ? or PNG 8 bit ?
Try to render again using PNG 16 bit, or even the industry standard OpenEXR
and using filmic instead of standard helped a lot too,
standard only has 8 bits of dynamic range, while filmic have 24 I believe
output properties &gt; output

This might help to improve your volumetric heavy scene.
try playing with the settings here,  Render - &gt; Volumetrics (eevee)
especially the Volumetric Tile Size , if you set it to 2px, the volume will be very crisp, sharp and looks amazing, but will lag your blender &amp; viewport. Increasing the samples might help too