4K videos in mkv/H.264 format i can play fine though.
The issue here is the hardware decoders capability;
Depending on which browser you use, and whether your Macbook is connected to power, websites will send you a different video/codec/size.
Here's a random post that sort of describes this: https://apple.stackexchange.com/a/409764