I’ve had similar issues running the latest Firefox (currently 142 as per this discussion) on the latest Fedora (42). I used to be able to lock the screen and go home but I’ve recently had a couple of mornings where I’d come into work and find my system unresponsive. I use the Magic SysRq command to trigger the OOM (out-of-memory) killer as many times as required to free up enough resources that I could log in on a virtual console (Alt-Ctrl-F2). This would allow me to manually kill Firefox, freeing up about 15GB of RAM and all 16GB of the swap file.
I’ve been too busy with work to spend any time investigating the cause. At first I had been blaming the `teams-for-linux` electron app but figured that wasn’t the culprit because I close it every evening. In Firefox, `about:processes` is useful while actually using the application but I’m not really sure how best to diagnose what’s happening after the fact.