Not a help post but something I would like to share quickly.
Lately, I noticed that YouTube was not streaming in 4k on Firefox browser on CachyOS Linux.
I toggled hardware acceleration and checked all the settings in about:config to ensure that it was allowed to play webm, vp9, mp4 and other formats.
I installed Chrome just to see if its a system wide problem but it was a browser only issue.
Checking the extensions, I found a h24ify extension and in its description it was mentioned that 4K will not be available on YouTube.
I don’t remember when and how I installed this plugin and since when it stopped playing 4K videos.
But, removing the extension fixed the problem even without a restart.
Hope it helps someone else in my situation.