One of the most interesting things I learned recently was that the binary idea of two biologically distinct sexes is a recent idea, that came on with the development of science and the field of biology. Before that, as in medieval times, the distinction between men and women wasn't strictly biological, but more spiritual and based on religious ideas.
Back then the word "men" and "man" referred to all people in general, and all people were apparently considered to be much the same but different on spiritual levels. Unfortunately just like today where people discriminate against men or women based on their biology and whether or not they think they are superior or inferior based on biology, back then they were discriminated against based on the ideas of who was spiritually inferior or superior. In the Christian era men were considered spiritually superior and women inferior as if they were less capable of reaching the same level of enlightenment and so on which is likely why "holy men" were usually men. In the long distant past or in some polytheistic religions perhaps the reverse was more true since there are a lot of relics of worship referring to women and their ability to create/nurture life inside and outside of their own bodies, which men cannot do.
Learning that the idea of what men and women "are" that we use these days is based on ideas from biology was kind of a wake-up call to me, because I'd been using those ideas to decide things too. We do hear justifications these days for men being better at this or that or women better than men for this or that and it's always based on their biology as the excuse. But those excuses have changed over time and they aren't really "proof" of anything. It's odd to hear how religious people are now using scientific ideas to define trans people and discriminate against them when many holy texts do not even have a clear definition of what a trans person is to even discriminate against them. On a spiritual level a trans person isn't a sinner or a transgressor just for being trans at all. Yet modern ideas have been twisted or usurped to justify some feeling that trans people are incorrect, unnatural and misguided. Interestingly there's examples of greater acceptance and acknowledgement of the trans phenomenon in more ancient cultures than today's "enlightened" or advanced ones.
As a former biologist I have a lot of respect for the sciences, but as a trans person I can see how scientific definitions about gender are simply not adequate and have been used to make a lot of people miserable, even by religious people who do not necessarily take a lot home from scientific study. But they have taken home the ideas about men and women's BASIC biological gender differences, and very little awareness seems to have been raised about how gender is very much a spectrum in nature and is decided by much more than XX and XY.
It's why I'm baffled that the church even has a stance on trans people - very little about it is even mentioned in the Bible. Do they have a stance on people born with intersex biology? Surely assigning a gender for a person with both male and female characteristics should be as religious taboo as a trans person changing their apparent gender if "changing what one is born with" is the unnatural thing to do.