Well, that is a good question. If I were never told I were a girl, and I saw another human child who didn't have what I had, but had something else, I'd probably ask about it.
Children are curious.
But, the sequence doesn't usually work that way. The sequence is that I know I'm a girl, and I know there are boys, but I don't really know the difference between boys and girls sexually. But, before that, I've been told I'm a girl, I've been called a girl all along, and I know Mom is a girl and Dad is a boy. In fact, I've been called a girl since I was born. So, the first difference I make is that girls have breasts and Dads don't.