X cores + X gigs of RAM does not mean better performance for higher values of X. That is the fundamental innovation of Apple Silicon, which people still struggle to grasp. The M1 upended how we think about CPU performance. It's not even a CPU, it's a unified memory architecture with hardware-level optimizations for macOS. You can't even cleanly compare the performance benefits of having memory and CPU on the same chip, because the time spent on copying operations is far less.
The plain fabulous joke is that we've spent 30 years thinking that increasing cores and increasing RAM is the only way to increase performance while the objective M1 benchmarks blow everything out of the water. The proof is in the pudding.