why installing something
I don’t watch YT a lot on my phone, but Freetube for desktop and Newpipe for android (F-Droid) support offline subscriptions, playlists, history and downloads of video or audio, background playback and you can sync both apps.
What firefox version? It could be that you are using xwayland depending on your or your distros settings. Maybe try setting
$ MOZ_ENABLE_WAYLAND=1 firefox
https://wiki.archlinux.org/title/Firefox#Wayland