I had the exact same issue, but my solution was expensive.
Built first PC last year. I'm listing specs to see if anything matches in your build.
-MSI MAG B760m MB
-i7-12700k CPU (Wasn't building for an external GPU and this proc has internal Intel UHD 770 graphics)
-2TB SN850x NVMe SSD
-32GB 5600 DDR5
-MSI 750 Gold
Internet speed is a steady ~850Mbps at this PC via ethernet. No way this is the issue for me.
It wouldn't post to windows from bios no matter what I did, but I got it to boot from a Win11 boot/install disc. Runs just fine since, but I had the exact same issue with video buffering, especially YouTube 4K vids. I tweaked everything I could find in the bios to no avail. I eventually became convinced that it is some kind of Win11 video cache issue b/c it would start playing fine, then 5 minutes into a graphic-heavy video, it would start to buffer and rarely recover. And it would play lower quality video with no issues. I researched and messed around with RAM allocation for a couple of weeks and never really fixed it.
An RTX 4060 fixed it but good. But, I suspect you don't need that much card to fix the problem of just video cache. An older card will probably do the same job, or you could just figure out how video cache works and how to manipulate it. I don't know enough about Windows to even know what to search for and what I did find wasn't much help.
Good luck.