Whats important is VRAM, not system RAM. The 4090 has 16gb of VRAM so you'll be limited to smaller models at decent speeds. Of course, you can run models from system memory, but your tokens/second will be orders of magnitude slower.
ARM Macs are the exception since they have unified memory, allowing high bandwidth between the GPU and the system's RAM.