Actually, gender is a term that is only correctly associated with language/words. There are three genders: masculine, feminine and neutral.
Sexes, though? Yeah, there are only two: XX = female, and XY= Male.
And, by biological definition, chromosomes determine sex.
‘There are three genders: masculine, feminine and neutral.’
masculine, feminine, and neuter...neutral is a position on a gearshift...
Where do you think the grammatical concept of gender came from? It is a natural development based on our perception of the world... there are two biological genders, hence many early societies developed languages that contain gender.
In the biological sense, there are two genders. And that dichotomy extends from the simplest bacteria to the most complex multicellular organisms.
It is not true that chromosomes always determine gender. But in humans and, I think, in vertebrates in general, chromosomes always determine gender. It isn’t always XX female and XY male—in chickens (and maybe all birds), it is the opposite.