The biological understanding of male and female is something like this. Some species reproduce sexually. Some species that reproduce sexually exhibit a consistent difference in size between the two gametes that come together in sexual reproduction. In those species, the producer of the larger gamete is called “female” and the producer of the smaller gamete is called “male”. We can thus draw a distinction between a species having sexes, namely having respective producers of two different kinds of gametes, each of which is needed for sexual reproduction, and the species having male and female sexes.
Let me speak vaguely but heuristically. Human reproduction has a deep ethical and theological significance because it produces persons. Moreover, humans normally reproduce sexually (the exception of course being twinning). So it’s unsurprising if the existence of two sexes among humans has intrinsic ethical and theological significance. But the difference between male and female seems to have no intrinsic ethical or theological significance. It matters that there are two reproductive kinds, but that one of the two kinds produces a larger gamete than the other has no intrinsic ethical or theological significance.
But of course even though what defines the difference between male and female humans is the difference in gamete size, the actual differences between male and female humans are not in fact limited to differences of gamete size. Those humans that produce smaller gametes produce more of them, while those humans that produce larger gametes produce fewer of them and gestate offspring. Humans have “primary sex characteristics” that support differing ways of reproductive functioning.
Here is a thought experiment. Imagine earth* where there are humans*. To a cursory external examination, humans* live, look and behave just like humans, and have the same kind of sexual differentiation. One sex produces lots of gametes and the other relatively few. The sex that produces fewer gametes gestates offspring for nine months, has mammary-type glands that nourish offspring after gestation, is a little smaller on average, etc. But on earth*, it also turns out that the the sex that produces relatively few gametes produces the smaller gametes. (There may be evolutionary reasons why this is unlikely. But unlikely is not impossible.) Thus, on earth* male humans* fill the same biological roles as female humans do on earth, except at a near-microscopic level where the sizes of gametes become visible.
Now overlay on this the social level. This could go in multiple ways. It is easiest to imagine that on earth*, male humans* have the same social positions, and suffer from the same sorts of discrimination, as female humans do on earth. But it could in principle be reversed: it could be that the social position of male and female humans* is like that of male and female humans, respectively. Or it could be nullified: there could be no significant differences in social position.
This suggests that there are three levels to sex/gender:
The definitionally fundamental distinction between male and female in terms of gamete size.
Other biological differences—particularly with respect to reproductive functioning.
The social distinctions.
The first two tend to be lumped together as “sex” or “biological sex”, while the last gets called “gender”. But there really are three distinct levels. We might roughly call them: “biological gametic sex”, “biological functional sex” and “social gender”. Thus, among humans*, the connection between biological functional sex and biological gametic sex is the reverse of how it is among humans. So we now have three different senses of terms like “man”, “woman”, “male” and “female”.