Endocrinologst here, it’s a great question.
- Some elements of gender construct are indeed socially determined but tend to follow physical traits. Like: any job involving upper body strength will be dominated by men.
- Some elements appear inborn even w/o tracking any physical traits. Like: women generally are more attuned to social relationships and this goes right back to newborns. Even newborn baby girls pay more attention to faces & recognizing different people & their relationships than do newborn baby boys. Also: even in male monkeys, baby males are fascinated by rolling and moving toys (trucks, balls) while the girl monkeys gravitate toward dolls. Males (both human + monkey) are also much more likely to do „rough-and-tumble play“, like wrestling and mock-fighting.
- an element that fascinates me is the following intersection of biology + culture: it appears that young children in any society search out that society’s particular gender roles and almost slavishly copy them. That is, a little girl is drawn to do whatever things she sees adult women doing, a little boy is drawn to do whatever things he sees adult men doing. They go really overboard with it, too, even in families where parents attempt to raise them w/o standard gender roles. There’s so much that is fascinating about this tendency – especially, how does a very young, preverbal child even know what sex it is? (Think about it; it’s not obvious.) Babies figure this out very early, in the first year, & immediately start aligning themselves with their chosen gender role, & it’s unclear how they know to pick the „correct“ role.
- a hormonal wild card that we don’t understand at all: human baby boys have a massive surge in testosterone from birth to 6 mos (after which T plummets again). It actually hits pubertal levels. (edit: this is a separate and later T surge than the prenatal one that is thought to affect sexual orientation. 2 different T surges, the first about halfway through prenatal development, lasts ~2 mos, then back down to zero; then a 2nd that kicks in right after birth, lasts 6 mos, then back down to zero again.) Cause unknown, effects unknown. The postnatal T spike is probably the most dramatic unexplained hormonal swing in human biology. I’ve always wondered if this postnatal T spike might have to do with gender imprinting, if it might cause some sort of „look for who’s nursing you, that’s your mom, the other adult is your dad, be like dad“ sort of wiring. (Related: Similarly I’ve wondered if bottle nursing might mess up this process. Wild speculation, but it seems like nursing is going to be the clearest cue, to a baby, of who is mom vs who is dad)
- However – recent studies indicate that transgender people do NOT seem to have simply sex-reversed brains. I was expecting, 10 yrs ago, that we’d find that MTF transsexuals had female-type brains snd vice versa, but early data are looking like they don’t. (Homosexuals do appear to have partially sex-reversed brains, but not transgender/transsexuals). Data are really scarce though.
- There’s also a totally baffling, population-wide correlation with sexuality, birth order, lefthandedness & fetal mortality: it appears there are fewer eldest-sibling + left-handed + gay/trans people than there should be if all those traits are independent. Fewer people are born with that trait-combination than are expected, and it appears they may die in utero. Which is just fucking weird.
tl;dr – nobody knows a fucking thing
Since this is shittyaskscience and not askscience, I’m not going to bother with citations, but the above is my impression of the literature.