I haven't had nearly that much trouble with more recent videos, which seem to have excellent sound reproduction. It very much depends on the original upload quality though. Some older videos (anything stuck on 240p or lower) are from a time before HD uploads were a thing, and surely used more aggressive compression.
Some uploaders are also simply unskilled; I'm mostly after video game soundtracks to listen to in my car, and especially for newer soundtracks you have to watch out for the uploaders trying to be "first" to gain the popularity, while sometimes using poor settings or a bad rip. There's nothing youtube can do to improve bad source audio.
they seem to use Opus with 160 kbit bitrate now, you can view the formats with youtube-dl -F. Bandcamp disallows using compressed source audio, i wish youtube would too.