Its done through Twitter Ads. Check the 'TweetDetail' API response and you'll find the necessary info. Before Musk removed the Source text from tweets, it would say "Twitter for iPhone, Twitter for Android, Twitter for Advertisers", now that is hidden on the front-end but is still visible in the API response.
View attachment 319752
What they do is, they publish a Tweet which contains a Video from Advertisers Dashboard and insert the Custom URL, if you click on the Video itself, it will redirect you to the Website of their choice.
I hope this answers your question.