Bugreports : https://www.reddit.com/r/firefox/comments/z1pnw6/libx11_1822_causes_firefox_107_to_freeze_under/
Ran into the same problem using Budgie. It started last sync when we updated libx11 to 1.8.2
Firefox as well as Chrome just hard freeze multiple times per day and havr to be closed via System Monitor.
Most notably when copy/pasting text or when trying to "Save as" pictures