My five-year-old daughter was very confident and very friendly with everyone until she started kindergarten. In the last four or five months I have noticed a lack of confidence in her, even if a stranger looks at her she starts crying and saying she is very afraid. She even tries to avoid going to school if she is behind in her studies. Her father has been suffering from depression and anxiety for the last ten years.
Your daughter may be just showing adjustment to school. If her problems persist, I suggest you talk to her family doctor or pediatrician.
Encourage her to be brave and face her fears. Tell her it is normal to be a bit afraid. But it is important to go ahead and do the things we are anxious of anyway.