But just to be clear: the reason that HCPs look for dicks and not balls when doing prenatal ultrasounds to check for fetal abnormalites isn't because the penis is considered a more important indicator of male sex than the testes are. It's because these scans are customarily done in the second trimester of pregnancy, long before the testes of male fetuses have begun their journey from inside the abdomen down and out into the scrotum on the outside of the body adjacent to where the penis grows during a much earlier phase of development.
In humans, the testes don't descend until the end stages of pregnancy; they typically start descending around week 32-34. But pregnant women who have access to medical care customarily get sonograms between week 14 and 20 to check to see if the fetus is developing normally and especially to check for neural tube defects and brain/cranial malformations. It's in the course of looking at the entire fetus to check for anatomical abnormalities of all kinds that the HCPs are typically able to see if the fetus has a penis or not.
In addition, some pregnant women get fetal scans ASAP in the second trimester solely for the purpose of looking for the presence/absence of a penis because they want to find out if the fetus is male or female - and that's their only concern. Or it's their principal concern, rather.
In countries like the USA, sometimes women get these scans ASAP to look for the presence or absence of a penis out of curiosity and anxiety - and because they want to be able to throw so-called "gender reveal" parties. But globally, the main motivation for doing prenatal scans ASAP in the second trimester is solely to determine the sex of the fetus so that female fetuses can be aborted.
Although sex-selective abortion is illegal in India, it's still so common that there's a booming black-market prenatal scan industry - and when fetal scans are done in medical settings or for medical reasons in India, it's illegal for the HCPs to inform the parents of their developing offspring's sex.
But nowadays, women pregnant with single fetuses or twins can find out if their fetuses are male or female with a high degree of certainty even before the the time when male fetuses develop penises. Genetic testing which tells the chromosomal and genetic sex of a fetus can be done as early as 8-9 weeks through CVS or the NIPT.
In CVS, fetal DNA is obtained by inserting an thin instrument through cervix and snipping off and extracting a tiny bit of the placenta. Obviously, that's invasive and costly. But still, CVS has been widely used in pregnancies where there's medical reason for early genetic testing for going on 40 years now. I personally had CVS in the 1990s, and my kids are in their 30s now.
In the NIPT, fetal DNA is extracted from blood drawn from the pregnant woman's arm or finger like it would be for any other kind of blood test. The NIPT is pretty cheap.
In the USA and some other countries, the NIPT has become part of standard prenatal care that's offered to all pregnant women who get prenatal care. All private and government-funded health insurance programs in the USA now cover most or all costs of the NIPT. In fact, in some states like CA, the NIPT is free for women on Medicaid and there's also no copay or other out-of-pocket costs for women with private insurance.
When the NIPT is available at no or low cost, women opt to get it at extremely high rates.A paper published before the Covid pandemic estimated that as many as 50% of pregnant women in the USA were already getting the NIPT. Pilot programs in Europe show that when the NIPT is offered by state-funded healthcare systems, 9 out of 10 pregant women opt to get it.
Along with the nearly-universal use of fetal scans as a standard part of prenatal care, the fast-growing popularity of the NIPT means that we're already in an era where it's very common and pretty normal for parents in the USA and some other parts of the world to know their their offspring's chromosomal/genetic sex and if their offspring have penises many months before birth. Which is one of the reasons that so many people have taken umbrage at the gender identity movement spreading lies meant to give the impression that no one knows the sex of humans before birth, and that a sex designation is rather arbitrarily "assigned at birth" rather than observed, recorded and/or confirmed.