If your sex is male, your gender is male. If your sex is female, your gender is also female. See? They’re the same thing. At least until librats started changing the definition of all the words to dictate their perverted views on everyone else.
Even the Victorians used the word sex.
Gender is a language term.
There are generally three (masculine, feminine and neuter) but there can be more (or less) depending on the language structure.
Gender, being a language term, by it's very nature must be fluid because language is partly based on perception and that perception may shift and change.
Sex, being a biological term, by it's nature is solid. It does not change because it is not based on perception but on straight out reality.
Pink is currently gendered as a feminine color. But it was at one time gendered as a proper color for a boy because a strong red was a masculine color. So a light red was proper for a boy. All about perception.
That women can have babies is not a gender perception but a solid biological sexual reality.