Downloading songs from YouTube can be done, but this is considered a form of piracy. I will not sit here and advocate piracy, so I won’t tell you how to do this thing. However, I can tell you that many of the songs that you jam out to on YouTube are available relatively cheaply from iTunes or other music stores. Amazon Music, for example, has many songs available for free to its Prime users as part of the Prime package (which includes video, shipping, music, and more).
If you’re looking at iTunes, most singles are available for between $0.60 and $1.30, and you don’t have to buy the whole album to get most songs. Be wary of this option, though, if you don’t have an Apple device; Apple is a little stingy about letting your iTunes collection off of iTunes, even though you legally bought it.