Out of memory with RTX 3090 and 32GB RAM when rendering

Thanks for the reply, it’s very strange as I replaced the GPU and tried new projects and even reinstalled unreal engine but nothing