a gender is a label that people identity with, and people can identity with whatever they want. some cultures have a "third gender" that is just as normal to them as "male" and "female" are to us.
sex is complicated, i mean someone can literally be born with the xx chromosome (typical for "biological women"), but have more traits (including genitalia) in line with "biological men". some people are born with a cock & balls but fully functioning breasts and a typically "feminine" appearance. that alone proves that there aren't just two sexes. they arent exceptions to the "rule", they're part of the rule, they're just far less common than what we'd typically define as the categories of "men" and "women".
everything i just said is extremely oversimplified, but nevertheless true.