The steps to use VLC to save a YouTube video locally:

  1. Start VLC
  2. Choose media, Open network stream, and click the network tab if necessary, and paste the link to your desired video
  3. Click the play button
  4. Next, choose tools, codec information and copy the URL in the Location textbox. It might appear that you can't copy it but you can. Make sure you get ALL the URL, being careful not to leave off a leading or trailing character
    Open your favorite browser and paste the link into the address bar
  5. Right click anywhere within the browser window and from the menu which appears, choose save target as and give it an appropriate name.

https://www.digitaltrends.com/computing/how-to-download-youtube-videos/