The official way to use copyrighted music on YouTube is through YouTube Studio > Audio library. The audio library includes free music and sound effects, some of which don't even require attribution.
You can download YouTube videos for offline viewing using tools like 4K Video Downloader Plus for high-quality and batch downloads, or YouTube Premium for a seamless ...