Many replies about Firefox having no problems on Youtube but I will confirm your complaint that it's an ongoing issue for some of us.
I keep retrying Firefox over multiple years and it's still not quite equal to Chrome for Youtube 4k playback ...
2021: https://news.ycombinator.com/item?id=28783904
2024: https://news.ycombinator.com/item?id=42176450
2026 still talks about the problem: https://go.tabbit.ai/blog/firefox-youtube-4k-stuttering
And a recent Youtube comment (2026-September) notices that Firefox doesn't run as well as Chrome on his modern high-end laptop with 64GB RAM: https://www.youtube.com/watch?v=vIE_PkuFeng&lc=UgxfGeBL6sopr...
I sometimes have difficulty with YouTube 4K on Firefox on my Mac Studio (M2 Max with 64GB). I don't really care though, because 1440p is always well and truly good enough. (And really 1080p is more than good enough except that the default bitrate is absolute dogshit. Most of the time I'm choosing 1440p is because it's bitrate is not dogshit.)
"Works on My Machine" reply.
4k? That might have something to do with it. Though given a big enough box that too shouldn't be an issue. But I'm using a decade+ old thinkpad driving a fairly high res dell and it works well enough.