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

As @el-daddy786 said, sounds like it could be a cache issue.