Well, it could be due to psychological factors. Maybe the environment and the way the person was brought up had an influence. For example, if the family had a more feminine - leaning environment or if the child was exposed to more female - oriented activities and role models from a very young age. And then, there are also some rare medical conditions that can cause a misalignment between biological sex and gender identity. But often it's a complex combination of these factors.
It might be related to the brain's structure. Some studies suggest that there are differences in the brains of those who experience a different gender identity than their birth sex. In the case of this young girl who was born a boy, perhaps her brain developed in a way that was more in line with female characteristics. Additionally, society's increasing acceptance of different gender identities has allowed people to explore and express their true selves more freely, which means that more cases like this are coming to light. It's also important to note that self - discovery and the support of family and friends play a huge role in the process of a person coming to terms with their true gender.