YouTube has two layers to it for uploads, all "quality" is decided by your encode settings and resolution bracket of media uploaded to it.
So you can upload to a bracket with the intent only to be used for that display resolution, this is fine when having 1080p and 480p/576p media with tight encodes to only serve proxys so horrible for lasting "quality" uploads as SD won't scale well on HD let alone UHD displays today.
Any 16:9 media just scale to 2160x3840 and for SD 4:3 media scale to 2880x2176 which YT treats as 4k.
1080p has been downgraded since the 1080p premium bracket was put in place, but this does not affect 2160p or "4k" brackets and higher (yet) so consider doing tight encodes and also pushing to Odysee and Internet Archive if you want long term unaltered online publishing, as YT does re-encode media every few years.
YouTube really likes HEVC 120mbps 4:2:0 8-bit 50p/59.94p media uploads in terms of how it's re-compression handles things, container format should stick to MP4.
(YouTube will respect 2160p ProRes HQ and ProRes 4444XQ files however if they are from native encorders or are legally flagged like a native encoder would)
Contray to the belief of some users, YT does also respect color space transfer functions to Rec 709 for SD media if you flag your files properly....
https://support.google.com/youtube/answer/1722171?hl=en
This info here from the support page still holds true in 2025 for SD/1080p media with AVC encoding via FFmpeg.
Progressive scan (no interlacing)
High Profile
2 consecutive B frames
Closed GOP. GOP of half the frame rate.
CABAC
Variable bitrate. No bitrate limit is required, although we offer recommended bitrates below for reference
Chroma subsampling: 4:2:0