I usually buy music and don't download it. Music can be had very cheap if you
only go for used CDs and LPs (which I mostly do, my favorite music is almost
always a decade or more old).
There is one main problem with music downloaded from youtube. The quality is
relatively low, at least for my expectations. .mp3 and .ogg can sound very
good, if what you get is the first generation encoding from a CD. But this
would either mean you download from some website that uses DRM, or you use
the illegal file sharing. We all know how much sense it makes to make sharing
illegal...
Downloading from youtube, in a lot of cases, means the file has undergone
threefold encoding: 1. Rip the CD into an .mp3 file, 2. Put the music into a
video and render it as, say, .mpeg (the audio track might get encoded again!
Even though it already is lossy), 3. Upload it to youtube (more encoding and
in some cases conversion is done on youtube's side).
If you find you can't hear a (relevant) difference, downloading from youtube
is probably the easiest way to get music.
There are several channels on youtube, where people upload rips of vinyl
records. In many cases they only encode the file once, during the video
rendering step and put the video in a format that is native for youtube (thus
no further encoding is done once the file is uploaded). These channels
usually have a MUCH higher audio quality than anything else on youtube,
easily audible difference with even relatively cheap headphones.