The birth of a boy and a girl is determined by the male y sperm, when the moment the sperm and egg are combined is already destined to be a boy or a girl.
The amount of male spermatozoa is 2 ml to 6 ml, and the normal number of spermatozoa per milliliter of semen is more than 20 million, of which the ratio of x and y spermatozoa is 1:1, so the birth of a boy or a girl is a random natural selection.