Although I am not comfortable thinking of the account of God's creation of Eve as being in any way allegorical or mythical, I do, however, think of the account as a kind of artistic and symbolic version of what actually transpired when God created another human being--a female human being--in His image who would complement the male of the species whom He had already created.
ONE. While the people of Moses' day could not appreciate the complexities of the double helix and the human genome, they did realize that all living critters, including humans, give birth to other living critters "after their kind."
TWO. Prior to God's making for Adam a "helper suitable for him" (Genesis 2:18), God brought all the critters He had made to Adam and gave him the assignment of naming all the animals. Interestingly (but certainly not coincidentally), among the perhaps tens of thousands of animals Adam named, he found not one "helper suitable for him" (2:20).
THREE. God then "fashioned into a woman the rib which He had taken from the man and brought her to man" (2:22). Just as God had fashioned, for example, a male and female sheep, so also He fashioned a human female counterpart to the human male. God made something different, not identical, out of Adam's rib! Part of that difference was a major "tweaking" of the human genetic code. Subsequently, the man and woman would procreate "after their kind."
FOUR. At the exciting "reveal" after God's surgery on Adam,
The man-person said, "At last! This is bone from my bones
And flesh from my flesh.
She is to be called Woman [Hebrew: ishah],
Because she was taken out of Man" [Hebrew: ish] (2:23 CJB).
Contrast, then, Adam's inability to find a helpmeet among the animals, with his actually finding what he could never have found in the animal kingdom. Notice how the Complete Jewish Bible phrases his first words upon seeing his helpmeet: "At last!" It's as if Adam was saying,
"Whew, God, I was beginning to think you didn't know what you were doing with all those boring animals you had me name. Don't get me wrong. They were wondrous to behold, but this, this lovely creature you have made is now truly "bone of my bone, and flesh of my flesh." Thank you, Lord!"
FIVE. Scripture then goes on to tells us,
"For this reason a man shall leave his father and his mother, and shall be joined to his wife; and they shall become one flesh" (2:24)
This part of my answer goes WAAAAAAAY beyond the scope of your question, but it is nevertheless germane in a prophetic and hermeneutically responsible way.
In a seminal passage on marriage, the apostle Paul lays out in Ephesians 5 the duties of wives to husbands and husbands to wives, and in doing so he quotes Genesis 2:24 in verse 31. Why? Because the marriage of one husband to one wife was God's design from the very beginning. And what pattern did God use in creating what we call today the "institution" of marriage? To answer that question I'll quote liberally from John Piper's book, Desiring God, pp.212-213 (excerpts):
It looks as though Paul uses the relationship of human marriage, learned from
Genesis 2, to describe and explain the relationship between Christ and the church.
But if that were the case, marriage would not be a mystery, as Paul calls it in
Ephesians 5:32; it would be the clear and obvious thing that explains the mystery of
Christ and the church. So there is more to marriage than meets the eye. What is it?
The mystery is this: God did not create the union of Christ and the church
after the pattern of human marriage—just the reverse! He created human marriage
on the pattern of Christ’s relation to the church.
The mystery of Genesis 2:24 is that the marriage it describes is a parable or
symbol of Christ’s relation to His people. There was more going on in the creation
of woman than meets the eye. God . . . patterned marriage very purposefully after the relationship between His Son and the church, which He had planned from all eternity.
Therefore, marriage is a mystery—it contains and conceals a meaning far
greater than what we see on the outside. God created man male and female and
ordained marriage so that the eternal covenant relationship between Christ and
His church would be imaged forth in the marriage union. As Geoffrey Bromiley
has written, “As God made man in his own image, so he made marriage in the
image of his own eternal marriage with his people.”
The inference Paul draws from this mystery is that the roles of husband and
wife in marriage are not arbitrarily assigned, but are rooted in the distinctive
roles of Christ and His church. . . ..
This is the foundation of the pattern of love that Paul describes for marriage.
It is not enough to say that each spouse should pursue his or her own joy
in the joy of the other. It is also important to say that husbands and wives
should consciously copy the relationship God intended for Christ and the
In conclusion, even more significant than God's handiwork in creating a female egg and a male sperm, each of which when united at fertilization brings half the genetic information necessary for the beginning of a new human life, is the profound reason for God's creation of male and female: 1) to reveal to us through the analogy of marriage His grand plan of redemption and His eternal covenant with all true believers; and 2) to grant to "us in marriage the privilege to image forth . . . divine realities infinitely bigger and greater than ourselves" (ibid.).