Before birth, the body decides after the third month whether a willy will be constructed or not. First, the glans grows larger. Later the foreskin grows over it.
The scrotum also forms, but is still empty. The balls pass through the abdominal wall and only descend later.
In the drawing to the right, the boy on the left and the girl on the right.