You can block tweets from individual gambling companies. Click the down arrow next to the post or the profile, and look for the option to "Block @..."
If the tweet is an advert, you can in the same menu select "I don't like this Ad" and Twitter will learn, not to show adverts which it categorises as similar.
You can disconnect other apps which may connect to your Twitter account on the ‘Your Twitter Data’ page here. Additionally, on your ‘Interests’ page here you can de-select any interests which might encourage gambling-related Ads to show, particularly if you have expressed an interest in ‘gambling’ or sports betting.
Please note this advice is not comprehensive as social media sites may change their operating policies from time to time. There is also no guarantee that information and settings will be carried over between devices (e.g. shared devices between family members). If you are worried about problem gambling, you may find it appropriate to exclude yourself from gambling directly. You can find out more about account closures, Self-Exclusions and the organisations in place to help you here.