To download individual videos and all videos in a playlist from YouTube, use yt-dlp.On Windows,
- download the yt-dlp executable to a folder
- download the ffmpeg executable to a folder
- add the folder path containing the executables for both yt-dlp and ffmpeg to your Windows user or system path in the PATH environment variable (see screenshot below)
- open a terminal / command prompt,
- change to the folder where you want the downloads to go
- run .\yt-dlp URL (I’m using PowerShell)

For example,
.\yt-dlp [Youtube Video URL]

If you want to download the 1080p resolution of the video and it is available, run the following command.
yt-dlp -f bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best [Youtube Video URL]

Download a Video Playlist
yt-dlp -f bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best https://www.youtube.com/playlist?list=PL-lZtPz7Ie0abE0PsxjDr2c5oSpcnhLdR
Download Audio Only
Extract audio from a video (requires ffmpeg or ffprobe):
yt-dlp --extract-audio "https://www.youtube.com/watch?v=oHg5SJYRHA0"
Specify audio format and audio quality of extracted audio (between 0 (best) and 10 (worst), default = 5):
yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 "https://www.youtube.com/watch?v=oHg5SJYRHA0"