What I mean by sex assigned at birth: usually a doctor, midwife, etc. does a visual inspection of the newborn's genitalia to define whether they're female/male/intersex. Unless the baby is visibly intersex, no other exams are done. Some intersex people have male or female organs and are raised as men or women, so the process is not a reliable way to assume genetic composition. They may learn later in life that they are intersex through other health conditions, if they arise.