It isn't the most powerful computer in the world but I never ran into any problems... so it's probably an OK compromise for most people, especially in the world where RAM is scarce because of AI datacenter buildouts.
OTOH, for my development Mac, I have 64GB of RAM. (Though 32GB would probably be fine.)
Mac devices have been able to get away with less RAM (and higher priced upgrades) for well over a decade. During the Intel era, they were the first ones to adopt SSDs as the default option while everyone else still installed spinning rust. That alone provides for way faster swap storage to conceal a relative "lack" of RAM.
And when they went for their own fully integrated stacks of soldered RAM and SSD? Then everything went off the rails - close proximity and no sockets means very low latency for both RAM and persistent storage on one side and on the other side it also allows for much higher bandwidth because of much cleaner signals - remember, even at "measly" hundreds of megahertz you're already in the territory requiring precise PCB design.
On top of that, macOS's scheduler seems to be much, much more efficient and outright better in constrained RAM (and CPU) settings to provide the feeling of "the system is still responding" than either Windows or Linux. The only setting where macOS goes into molasses is when you not just run out of RAM but of free disk space as well.