I’m going to go in the opposite direction as most opinions here. This was just last week so it is fresh in my mind but I literally was there as my 16 (almost 17) year old daughter came to the conclusion that she was heterosexual. She had long been unsure or “unknown” and had even repeatedly asked her younger brother how he knew so strongly.
The conversation was more extensive as we were watching the Series 1 of the UK Sherlock Holmes reboot, but summarized went something like:
Daughter: I don’t understand, but Benedict Cumberbatch is both incredibly handsome but also funny looking and his hair is not good, but he is very attractive. Jon Hamm is also very attractive but doesn’t have anything weird about him but is not as attractive as Benedict.
HerMother: Have you ever looked at a woman and said, “I see her flaws but I still find her incredibly attractive.”?
Daughter: No, but I do see woman as attractive.
HerMother: I think you are straight and are just more attracted to men is all.
Daughter: Huh?.. oh… OOOOHHH!
As her parents, we clearly do not care and have made that abundantly clear. She played softball and soccer in a bright pink skirt over her shorts/gray pants and had pink cleats for all of her games. Skirts were her identity and she wore them every single day until her freshman year. Now, she is in several gay-straight alliance-like clubs. Her best friend is non-binary-identifying.
This is all to say that some people don’t just inherently know from an early age. I suspect that there is similarly a broad spectrum in self-identification (I, myself, knew by 1st grade that I wanted girls to think that I was the best boy there- but the sexual component was several years later.)