RAM is a totally different type of storage designed for quite a different purpose.
The biggest difference with RAM is that it's not persistent, which means it loses all it's data as soon as the power is removed. Hard Drives (and SSDs) on the other hand, need to be able to retain their data without power, otherwise your system would get wiped every time you powered off. On an architectural level, that means RAM can be designed completely differently.
What that means in real terms is that RAM can have much higher throughput (MB per second), with vastly lower latency and can handle thousands of times more operations per second. Of course, it costs way more, requires dedicated memory controllers and must be located physically very close to on the CPU, isn't able to retain data without power, and costs way, way more.