For some reason, it starts bugging out and I had no idea what I did to caused this. A simple scene with an almost 1gb of hdri cause the entire scene to not be rendered out. I have a 16 gb ram.
Then you are rendering on GPU, "Out of memory" means that you have hit the limit on GPU, not CPU. Things like huge textures may grab a lot of memory in GPU. And they are uncompressed in GPU, so that it can get more than 1GB.
To help you, Blender may provide you an information about used video memory. Pres RMB on status bar (at the bottom of the window) and activate video memory:
Now you can see how much VRAM is used in system:
So probably you can find that for example that huge texture is double loaded in material preview and cycles, so that you reach the limit. And of course, Blender may use system memory during rendering (not preview) so that should help for final render.