early stage embryos of both sexes are not easily distinguishable by genitalia, they look morphologically similar. later developmental events culminate in morphological rearrangement to male form.
lack of response to testosterone during development results n a curious state of affairs, where a person is genetically male, having x, and y chromosomes, develops according to a female plan. external appearances are female, with loss of secondary sex development in puberty.
Androgen insensitivity syndrome:
https://en.wikipedia.org/wiki/Androgen_insensitivity_syndrom...
(Scientific American is throwing up a paywall even though they're only republishing https://theconversation.com/look-your-eyes-are-wired-backwar... At least they link to the original.)