You can use
There are many ways to install it, one of them is
with the package manager of your distro:
sudo apt install yt-dlp
To download a playlist you only have to type in a terminal
the URL of the playlist you want to download, and press the
Enter key. For instance:
This program not only downloads videos from YouTube, it can also download videos from many websites.