Normal people have 23 pairs of chromosomes per cell, of which 22 pairs are autosomes and 1 pairs are sex chromosomes. Sex chromosomes determine a person's sex.
If a woman, her sex chromosome is XX (two X chromosomes), if a man, his sex chromosome is XY (one X chromosome and one Y chromosome).
People produce germ cells through meiosis (women are eggs and men are sperm). The chromosomes in sperm and eggs are half of the original chromosomes. Because the female sex chromosome is XX, the egg chromosome can only be X. But the sperm chromosome can be X or Y. 。
After sperm and egg combine, the chromosomes in sperm and egg form a pair of complete sex chromosomes. If this sperm carries the X chromosome, the sex chromosome of the fertilized egg after combination is XX. You will find that this is the same as the female sex chromosome, so the fertilized egg will develop into a girl. However, if the sperm with Y chromosome is combined with the egg, and the sex chromosome of the fertilized egg is XY, it will develop into a boy.
So the sex of the child is really decided by the father. It depends on whether the sperm on the X chromosome is combined with the egg or the sperm on the Y chromosome is combined with the egg.