Sound disappeared in Firefox sometimes and did not come back, while playing YouTube videos. Only recourse seemed to be to restart the computer! I got it back by installing a new sound system called pipewire, see instructions here: https://ubuntuhandbook.org/index.php/2022/04/pipewire-replace-pulseaudio-ubuntu-2204/
Seems to be a problem for a certain Intel chipset?
Discussion here: https://askubuntu.com/questions/1406874/youtube-freezing-videos-in-fresh-22-04-installation