You can use the versatile YouTube video downloader, the open-source command-line utility yt-dlp to download videos from Twitter as well, apart from YouTube. Usage is super simple, just pass the full URL, which you get with the share button and copy link option under every tweet. A sample usage is given below.
Be aware of fraudulent clones of this utility and be safe by downloading it directly from their GitHub site (github.com/yt-dlp). Most of the videos on YouTube and Twitter may be subject to copyright, so please respect the creators’ rights. I use YT-DLP and its parent YouTube-DL for my personal archival purposes of videos from my friends and family.