I personally do not like high dynamic range videos. They make videos way too bright and make everything else look washed out and ugly. I searched and searched today for a way to find out how to turn off HDR on YouTube while using Firefox (160.0.1) on MacOS (27.2.1). It took me forever, but I found the solution after some digging. I wanted to share here so that hopefully if other folks have this issue too, they can easily find a solution.
In order to turn off HDR on YouTube, type about:config into the URL bar, then search for "HDR". You'll be looking for a setting called gfx.color_management.hdr. Set this to false, then reload your YouTube tab. This is set to true by default.
Hope this post helps someone else in their search to turn off HDR!