Hey, I forgot about this part in my earlier answer - estrogen.
"Ovaries matter because they produce a lot more estrogen than testes do, and estrogen helps direct bone development. “In all human skeletons, a lot of estrogen stimulates long bone growth,” Dunsworth explained. Before puberty, people with ovaries and people with testes grow at roughly the same rate. Then those with ovaries ramp up estrogen production, which stimulates the growth plates in their bones and causes the long bones in particular to lengthen. That’s why, during early adolescence, girls are generally taller than boys.
The spike in growth isn’t long-lived, however, because high levels of the hormone make the growth plates fuse, Dunsworth explained. That is why height differs between the sexes: People with ovaries experience the growth-stopping peak in estrogen soon after puberty, “right after their ovaries start to kick in and regularly contribute to monthly cycling,” Dunsworth said. Meanwhile, the bones of people with testes continue to grow for several years until their estrogen peaks, so they end up taller."