There are some broad brushes we can start with.
No one born with a penis is a woman. Full stop. Because womanhood is physical not mental, and whatever sits within the small group of people for whom different aspects of sex development are not aligned and classification is more challenging, the presence of a penis is not one of the questionable features.
Likewise, no one who menstruates or has menstruated or will menstruate or would menstruate were it not for medication is male. Full stop.
No one born with normally developed vagina, uterus and ovaries is male.
Given that checking for a new born's penis is easier than checking internal structures, in practice this means:
Quick glance at the baby. If it has a penis it's a boy. If it doesn't and her bits look normal, assume it's a girl. If anything looks unusual, further tests.
If a girl doesn't start to menstruate when expected, further tests.
There we go. Pretty easy and simple rules for the majority cases, dealing with the tiny number of people for whom different aspects of sex development are not aligned and classification is more challenging as they arise.
No woman has a penis. A person with a penis who believes himself a woman is mistaken.