I've used an addon for a while which fixed it by forcing YouTube to serve h264 rather than vp9 content, as hardware accelerated decoding of h264 worked but not vp9. But lately it hasn't worked well. Haven't investigated if it was due to newer content only being vp9 or if the addon stopped working.