First go to the twitter application.
Tap on the three dots of the profile icon
Find the settings and privacy option
Click on that privacy and safety option
Then enable the protect your tweets, toggle to another side for activating the feature. But in some models you can also see the checkbox instead of the slider.