I'm using an M2 Air with 16GB and M1 Mini with 8GB. On the 8GB machine I have to restart Firefox every few days because otherwise it completely fills up RAM + Swap and the entire system starts getting sluggish. It's a very noticeable bottleneck while on the 16GB Macbook I don't really think about memory usage.
I would not recommend the 8GB variant to anyone who plans on using it for more than a couple browser tabs and some light tasks.
Check about:memory in Firefox. It's not reasonable to run out of swap; that means it's trying to keep something like 40GB in there after compression. You might have an extension or something leaking.
I would not recommend the 8GB variant to anyone who plans on using it for more than a couple browser tabs and some light tasks.