This is why Docker takes so much RAM on your computer (it really depends on the host OS).
On macOS and Windows, Docker needs to create Linux VMs to operate on. Containers need a Linux kernel so Docker Desktop runs a full Linux VM (based on Apple's Virtualization Framework or WSL2/Hyper-V on Windows). That VM needs memory allocation and for the majority of it, the host OS sees the contiguous memory fully allocated even though the guest VM might not be using it fully.
If this was not enough, there are a few other things that can make it a memory hogger. The Linux kernel inside the VM has page cache build up (think dentry, inode, build context, volume I/O). This is generally reclaimed inside the VM due to causes like memory pressure and cache drainage. Docker Desktop UI itself (Electron, etc.) adds its own overhead. In most cases, you can easily change the maximum memory allocated to containers using the Docker Desktop settings.
If you are using Docker on Linux, it is going to be relatively cheap. This is because on Linux we are simply depending directly on namespaces, cgroups, processes and such.
Absolute Docker experience! :)