Browsers and anything electron-based are your enemy.
Firefox is actually pretty good in low-memory situations, silently discarding tabs when under memory pressure, but the main benefit comes from being able to run proper adblocking. Chromium-based browsers just can't compete these days.
Otherwise, a bog standard Gnome-based Debian Trixie desktop should be pretty doable. I'm currently using an 8 GB machine with 3.7 GB RAM free - Firefox, evolution, gnome-calendar, and gnome-software are the only apps that using more than 100 MB, and none of them are obligatory.
it's probably the "you only notice when it doesn't work" situation, but my experience with firefox on ram limit has been a lot about tabs forgetting the url in them
as in, I click "open in new tab", some time later I switch to them... only to get hit with "new tab", even though a moment ago it displayed tab name and I could right click -> bookmark to preemptively copy the address
>[Firefox runs] proper adblocking. Chromium-based browsers just can't compete
Any familiarity with Safari and blocking performance? uBlock Origin Lite is a simple option, AdGuard can do more (injection?) though uBO feels more trustworthy still…
Funny I'm using Ubuntu 24 i3 with vs code on a black 2008 Macbook
Seconding ad-blocking. I have a low-end phone (4GB ram, and a mediatek processor from 2018), and setting up DNS-based ad-blocking made a lot of sites go from unusable to usable.
I haven't carefully profiled memory use, but in my experience, Chromium is so much more performant than Firefox on ARM devices that any difference isn't worth it. If you're using a lot of tabs, it might lean in Firefox's favor, but overall performance so strongly favors Chromium that I've given up trying to use Firefox on anything but my high performance machines. I'm not sure where the performance delta is coming from, but the whole UI and JavaScript anything are much more responsive on e.g. A73 cores with 4GB RAM.