The word sex has many meanings. From the OED:
1
a. Either of the two main categories (male and female) into which humans and many other living things are divided on the basis of their reproductive functions; (hence) the members of these categories viewed as a group; the males or females of a particular species, esp. the human race, considered collectively.
b. In extended use, esp. as the third sex . A (notional) third division of humanity regarded as analogous to, or as falling between, the male and female sexes; spec. that consisting of: (a) eunuchs or transsexuals; †(b) humorously clergymen (obs.); (c) homosexual people collectively.
2 Quality in respect of being male or female, or an instance of this; the state or fact of belonging to a particular sex; possession or membership of a sex.
a. With regard to persons or animals.
b. With regard to plants
3
a. With the. The female sex. Now arch. or literary.
4
a. The distinction between male and female, esp. in humans; this distinction as a social or cultural phenomenon, and its manifestations or consequences; (in later use esp.) relations and interactions between the sexes; sexual motives, instincts, desires, etc.
b. Physical contact between individuals involving sexual stimulation; sexual activity or behaviour, spec. sexual intercourse, copulation. to have sex (with) : to engage in sexual intercourse (with).
For the purposes of this post, we are going to ignore the OED’s definitions 1b and 3a+b, as it these are pertinent mostly to literary as opposed to everyday usage. Having done so, we are left with four main definitions:
1. A division into two groups by reproductive function
2. Membership of one of these two groups
3. The social and cultural distinctions stemming from such membership
4. Actually bumping uglies
OK, let’s go ahead and ignore number 4 above too. Not that the definition of what constitutes sex is uncontentious, but it’s not the subject here. It is the subject here, and I think you should go ahead and read that cause it’s good. But I digress (already!).
So we’re left with three things to unpack: what it means to declare a division into two groups; what it means to be a member of one of those groups; and what it means to create or be subject to social and cultural distinctions based on these two groups.