One more time, for the people in the back...
We are born male and female. We become men and women.
Sex and gender are not the same. Sex is determined by the sex chromosomes. Women carry X from their mothers and X from their fathers (who got it from their grandmothers). Men carry X from their mothers and Y from their fathers.
These tiny haploids reside quietly until a pregnancy happens. Then they combine. XX for a girl, XY for a boy are the most usual combinations. XO, XXY, XYY, and other permutations happen, but are not always viable.
Gender is determined by society. And it starts with gender reveal parties from the ultrasound. Pink for a girl, blue for a boy. Flowers and butterflies or trucks and boats on the clothes. Toys, language, and everything condition the child to perform the role their genitalia dictated at birth.
There was a trend to gender neutral childhoods in the 70s and early 90s alike. Both of these were met with strongly gendered backlash and even more emphasis on frilly femininity and macho masculinity. In 2015, Target quit labeling toys by gender. The outcry was ferocious.
Gender is a performance.
It varies from society to society, from era to era.
What is manly in one place and time
is disparaged by other of the same time. The soldier above was what the soldiers below called "a lady from hell." (the kilted units took it on as a mark of pride)
Yet there is nothing feminine about him or about these men, save the lack of trousers
When Katherine Hepburn wore pants in her films, it was considered racy and daring. Nowadays, skirts are seldom seen in public because they are impractical for the active lives most women lead.
Gender performance changes over time, over region and over class.
200 years apart, roughly. All of these aristocrats are considered fashionable and very masculine.
Gender and sex are not the same. Gender is the performance. Not everyone's performance will match their assigned sex.
Not everyone has passing privilege, as the three public figures above do. Most transwomen must undergo a great deal of work to alter their features. Some choose not to.
Sex is what is in your pants.
Gender is how you present yourself to the world.
And lately, more and more people are choosing to give no performance at all.