My M1 Air crashes everytime I wake it from sleep and then immediately watch a Youtube video in Firefox. I can reliably reproduce this. If I open the laptop so it wakes up, login, and open a Youtube video it will hard crash close to 100% of the time.
Firefox just changed how their full screen video playing works in the most recent released (version 94). Could be that. Try an earlier version of Firefox.
M1 Air here that I've had for almost a year with zero issues, and I also use Firefox and watch a lot of youtube.