It doesn't happen suddenly, but it is accepted that children do not have the capacity to make serious or life-changing decisions - e.g. you can't enter into a legal contract until you are 18.
Children under 18 go through many stages and states and may be confused about the gender stereotypes that society forces on boys and girls.
The ideal would be for them to be supported to ignore 'boys have to be like this' and 'girls have to be like that' and not to be told 'if you're a boy who is like that you might be a girl' or 'if you are a girl who is like this you might be a boy'.
It's about giving children and young people the space and freedom to become the adult human female or adult human male they want to be, without feeling that they are in some way 'wrong' and need to transition into something else.