YouTube’s Terms of Service explicitly mention that users shouldn’t download videos unless a download button or link is shown by YouTube on a particular service.
Although some YouTube videos are available for download and offline viewing, using third-party apps to download YouTube videos is against its terms.