And this is just for a consumer GPU, I haven't even touched on the datacenter-grade stuff.
tl;dr the M2 is an underpowered GPU with a lot of RAM close by, while NVIDIA cards are multiple orders of magnitude more powerful but most of the RAM's a bit farther away.
seriously, measuring graphics cards in gigabytes is like measuring battery life in volts. it's the wrong unit.