Ultra sound would show it too. I guess a lot these parents think they are the first ones in history to have a baby.
These days there’s a quick blood test, where you get lab results back after two days, based on fetal DNA in mom’s blood. It works in first trimester.
But thats just genetics. Gender is decided by the kid’s kindergarten teacher.
https://royaltywellnessspa.com/how-early-can-a-blood-test-tell-you-the-gender/