Having read what I could over the years on the academic side of "women in tech" (i.e., academic research studying the matter, rather than opinion pieces), the consensus seems to be that the early teens are the time where the decision is taken to move away (or not) from STEM fields. That is part of why the Girls Who Code initiative & others like it is such a big deal.
There are a lot of different factors and stereotypes playing into the decision to exit STEM tracks, but among them are - "unpleasant male geeks", "programmers work alone", "girls don't need to know math", "boys figure things out" and so forth. (Clearly these are a subset of examples, and also clearly not all of these are 100% influential for any particular person, place, time). So the stereotypical 13 y/o girl and her interest in STEM is actually the target of a lot of research and policy efforts.
There's also a self-reinforcing aspect to this: heavily gender-coded places aren't typically presenting a welcome to people of the other gender. I read a academic paper on this in the last several years, but can't recall the experiment in detail or the citation. The implication is that a workspace festooned with seriously masculine widgets often tells many women that, "hey, man cave here. not so welcome".
For the interested person, the academic experiments are usually well done and their results, while not always surprising, clearly quantify certain sexist aspects in the tech world.