Twitter does not ask for your gender or where you from when you sign up. Thanks to Machine Learning, they can infer based on what you tweet and serve up relevant ads.
Perhaps Twitter is using “Infer gender from first name” approach based on your Twitter handle. A search on Google turns up some interesting tools and approaches that helps you to “Infer gender from first name”
There are times, they do not get it spot on. Ads for Ukraine woman seeking marriage do appears on my Twitter timeline on few occasions.