Basically, apart from the vagina itself, almost every part of male and female genitalia is made of the same essential “stuff”, just smooshed around to suit different roles. Crucially, all the most important nerve endings are there— so if you rearrange stuff to be in more or less the right place, you get something that works more or less the way you’d expect.
The only issue is, if you got the deluxe variety pack at birth, you probably have a bunch of extra “vulva skin” that you don’t really need, and it’s hanging out in just the right place to make a neovagina out of. Neat!
But if you’re stuck with the original flavor, you’ve probably only got a tiny little bit of “penis muscle” to make do with, so you have to get much more creative.
Basically it's if you have a gene on the x chromosome that increases height by an inch in a man, it will only increase a woman's height by half an inch. And vice versa with removing an inch.
Reminds me of the one bit of weirdness with birds - they have the opposite convention of sex assignment being based upon ZW where males are ZZ and females are ZW. Females also have two ovaries but only one of them is active and the inactive one produces testosterone - meaning that if the primary one lost functionality they would start spontaneously masculinizing.