There are two sexes: male and female.
There are three genders (a grammatical term): masculine, feminine and neutral (not referring to either sex but only to people in general).
Everything else is mental illness.
There's also "common gender" but your overarching point stands. Sex is a biological distinction. Gender is a grammatical distinction.
XX and XY...it’s science!