My wife has an 8GB M1 and I have a 16GB M2.
First of all, to answer the question: RAM is by far the more important upgrade. You have to understand that RAM speeds and access times are thousands of times faster than storage, a faster SSD only helps with file transfers.
Also, those "mono SSD" speeds are already much faster than any disk in the world was just a few years ago, and fast enough for just about any regular task with the computer. But RAM is RAM, once you fill it up and you go into swap, things slow down a lot and there's nothing you can do about it. My wife is constantly in yellow/red memory pressure with her 8GB M1. 8GB might be barely okish now, barely, but 1-2 years down the line you're gonna regret it.
Don't listen to the clickbaity youtubers. Get 16GB.
As for M1 vs M2, again, having both, the M2 is so much nicer to look at and use. The symmetrical screen and smallers bezels make for a much better user experience, in my opinion. Also, it feels lighter than the M1 because the weight is more evenly balanced. Last but not least, the screen is brighter.
So purely from a price/performance perspective, sure, the M1 is of course a better deal. But a laptop is much more than that, it's a complete package, and the M2 is just nicer to use overall, if you can afford it.