Anxiety does not cause a child to stammer. Research suggests that some children report more symptoms of anxiety compared to children who do not stammer. But that does not mean that anxiety causes stammering.
Environmental factors, such as bullying and negative reactions from peers, can lead to more worry and apprehension about speaking, would could affect a child's self-esteem and make them more anxious about speaking situations.
The relationship between anxiety and stammering is on-going to help us better understand factors that may influence the development of anxiety in young people who stammer. But it is generally accepted that anxiety does not cause stammering.
It can help for a person to receive support understanding and resolving the links between their thoughts, emotions and behaviours around their stammer.