I've been experiencing this issue for a while, but didn't really bother me until I started using Youtube for music and it hanged after every 2-3 videos.
Basically what happens is if I click on a new video or YT moves onto the next one, the red bar on the top gets stuck at ~75% and just nothing happens. The UI is still interactable but the only fix is reloading the page forcefully. Happened across multiple browsers (Chrome and Edge mainly).
At first I thought this was a networking issue, so I removed my PiHole and uninstalled any virtual network drivers I had (mostly VPNs) and rebooted both my router and my PC. The issue still persisted.
I started checking the Networking tab of inspect element to see what I find, maybe uBlock is blocking something. Well it was blocking something, but it wasn't my issue, as it still persist even if it is disabled. Networking tab with uBlock enabled looks like this ...
and with UBlock disabled...
These requests just keep on pending, they never fail. I checked with an API tester and it returns an empty result on a POST request, but it does return something and doesn't just get stuck. What I noticed is that dev tools mentions the requests not having a cache control header, but the returned request in the API tester does, not sure if this is significant.
I also tried clearing browser cache, reinstalling browser and uninstalling/updating NIC drivers. Shift+Refreshing the site temporarily solves the issue for like 10 mins.
Here is the URL which is stuck on pending: https://www.youtube.com/youtubei/v1/log_event?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8
This has been pain for me, any help is appreciated.
EDIT: Here's the header tab of the specific request (exact same with and without uBlock). It doesn't show the initiator, which is desktop_polymer_inlined_html_polymer_flags.js and it comes from line 178023, if that's helpful info: