Strange black mist/spots only when rendering

Here you can see my scene in viewport


looks normal.
But when I try to render this scene I get strange black spots

This started when I enabled nanites on all of my meshes.
Here is render that I made before that

I tried turning off bloom and adding more light to the scene but it didn’t work :frowning: