Luckily, we have an even safer method when it comes to downloading YouTube video or music, which is guaranteed not to infringe on any laws or terms. In recent years, the company has implemented a feature that allows users to save content directly from the website or mobile app. It can then be accessed again any time you load up the app, even if you're completely offline.
In the U.S. this feature is locked behind the paid YouTube premium subscription, but it is available for free in some other regions. Once the feature is enabled, you can find a "Download" arrow button under "Videos", next to where you'd usually find sharing and commenting features. The compiled list of songs and videos can then be found and viewed in the "Library" section of the app. There, a YouTube Music Premium member can enjoy offline listening and offline playback.
Yes, you can save YouTube music videos and songs with a YouTube premium subscription. The only drawback is that any downloaded file or other asset can't be moved, copied or modified by the user in any way. They are still considered locked to the YouTube service and can only be accessed through the app, much like the way Apple Music and Spotify work.
Additionally, if any saved video is deleted from the YouTube server, it's also likely to be wiped from your device the next time you get online. This is considered a necessary function so that no copyright violations can be allowed to occur.