macOS will pop up a window that says the system has run out of application memory, asking you to quit applications. I have a friend with, I believe a base M3 Air, who runs into this constantly with nothing but Firefox open.
(Been trying to get them to switch to Safari, but they prefer the Firefox name. I don't think there's anything wrong with Firefox other than it being less native.)
Does Safari use less RAM because it shares some parts with the rest of the OS? (e.g. in the same way Edge probably uses a bit less because half of its components are already idling on the OS)
You could say that. WebKit is in the dyld shared cache, so all of Safari's subprocesses share the same copy of it (and JavaScriptCore, etc.) in memory. But I would say it's more efficient because it integrates better with the platform's QoS primitives. I'm not sure what Firefox does in that regard, other than stuff from other platforms that don't have QoS (such as the throttling of JavaScript APIs like timers). Safari seems better at prioritizing the tabs you have open and backgrounding everything else, letting things go to swap, killing resource hogs, etc.
(Been trying to get them to switch to Safari, but they prefer the Firefox name. I don't think there's anything wrong with Firefox other than it being less native.)