yt-dlp is a fork of youtube-dl, it can be used to download videos from youtube and many other similar websites. yt-dlp is more actively developed.
https://github.com/yt-dlp/yt-dlp
To install yt-dlp on Ubuntu, run
pip install yt-dlp
To download a video, you can use the command
yt-dlp https://www.youtube.com/watch?v=VIDEO_ID
To see all available formats
yt-dlp -F https://youtu.be/ykeW7Jw1K6E
To download audio only
yt-dlp -f 140 https://youtu.be/ykeW7Jw1K6E
See youtube-dl