As to sex and gender, they are two very different concepts. Gender is a condition of the brain, likely biological in origin, which usually matches the perception of sex, but not always. That is why LGBTQ and Tran‘s people exist. They are a variation from what most people would consider to be the norm. Once upon a time psychologists treated these as mental pathologies which could be corrected through therapy. Over the decades, they have come to realize that they are not psychological problems but part of the innate being of certain individuals. Science is providing more proof of this every day.