Gender refers to the social, cultural, psychological, and behavioral roles, norms, and identities that a society associates with being a man, woman, or non-binary or third-gender person.
Sex are biological attributes in humans and animals, including chromosomes, hormone levels, and internal or external reproductive anatomy.
So, there are 3 sexes; male, female & intersex.
But many genders.