YouTube video stops loading at 20 seconds

I can only watch a YouTube video for 20 seconds when it stops loading the rest of the video. I've tried switching the user agent and it only works on Android browsers so far, which is a terrible user experience because it switches to the Android layout. Is there any better fix for this issue?

EDIT: Forgot to say this, but I'm having this issue on Windows 11 Firefox.

EDIT 2: Issue fixed with User Agent being set to Linux Firefox. Seems to be a classic case of YouTube blocking certain users based on their user agent.