Why do compressed videos look awful?

Publish videos - where, what quality etc.?

I used to publish videos in SD resolution on my web space, when the resolution got bigger (FullHD) and thus the files too, I simply put my videos on YouTube. Interestingly, the image quality was okay at the time, i.e. I hardly noticed any artifacts or the like because YT would have "edited" the video.

Now that I upload 4k and 5k videos in at least 2k7 or even higher resolution, I notice that the YT is still being processed and compressed so much that there are some unsightly artifacts to be seen.

In addition, YT does not seem to recognize anything above 4K and thus renders a video down to a maximum of FullHD - or the processing simply takes so long that the video cannot be seen in all resolutions in 2 days ... (have such a video for Test uploaded and then deleted after 2 days!).

When looking for alternatives, I came across VIMEO - at least for smaller videos (max. 500mb - the weekly limit for the free account) should VIMEO be very useful. Because one and the same video is saved with VIMEO without noticeable artifacts, whereas with YT the quality is terrible. Even videos uploaded in 5k are shown on VIMEO in at least 4k!

And playback in the same resolution (i.e. FullHD) is worlds better in VIMEO than on YT.

Should YT really have gotten that bad by now?

Because of my new graphics card, I also tried different compression formats and apparently gained a new insight:

Videos in H265 are hardly further compressed even on YT and thus retain the image quality of the original at first glance in all resolutions - no artifacts can be seen.

One time YT in 4K 16: 9

Once VIMEO in 4k 32: 9

What experiences have you had, what can you recommend?