It will only work for h265, as that is the only hardware decoder available in the Pi 5. So it won't help you with for instance YouTube, as they use VP9 and AV1 (or you can force h264 with a browser plugin).
You can try Firefox.
https://bugzilla.mozilla.org/show_bug.cgi?id=1833354
Or change some of the flags in Chromium, but it feels as if they keep changing, so you might find other suggested flags all over the internet.
You can set the mentioned flags in: chrome://flags/
https://bbs.archlinux.org/viewtopic.php?id=244031