Developmentally.... kids go through stages.
So, they can go through stages of being not shy about anything, to stages of being "shy" about things.
It is all developmental based.
And "separation anxiety" as well, is not something that only babies have. It is something that even older kids or Toddlers go through, but at each age stage, it is expressed or manifested differently.
There is nothing "wrong" with being shy. And it also has to do with "stranger" anxiety too, which is normal. If a child never learns these things or just is friendly with anyone for example, that is not good either. In fact, a developmental Specialist once told me that, she would be more concerned about a child that didn't have 'fears' or was always friendly with everyone and any situation... than about a child that was "shy." Why? Because, it means that the child did not develop or learn... their own cues per social situations. And this is a very important thing.
Extroversion, does not make one kid better than the other.
Kids or people, do not have to be "friendly" with everyone.
And it ebbs and flows and varies.
This is normal.
ALL kids, go through this.
Normal.
I never forced nor expected... my kids to be friendly with everyone. They NEED to learn, their own cues too... and their own sense of boundaries. This is very important, so that they learn sefl-awareness and self-reliance. It has nothing to do with, confidence or not. It is also about trusting themselves... instead of just being made to have to interact because it is expected.
And being more "clingy" with Mom per certain ages and situations, is NORMAL as well.
A child, is always changing per cognition and per imagination and at this age... they are not even fully developed per emotions. They can't even explain their emotions, they don't even know the names for all emotions nor do they even know how to analyze social situations or cues etc.
So, all of this is normal. And "shyness" too.
Your daughter is only 2, almost 3.
That does not mean she will be like that forever nor in Kindergarten. A child changes so much per each age stage and developmental stage.
Normal.
LET her... know her own self, and her own cues.
My daughter for example, was like that when younger. But because I taught her to know herself and her own cues... she is very wise for her age and about discerning others and social situations. She is 9 now, and knows herself very well. SHE, chooses her friends and is not just having to be friendly with everyone in order to feel good about herself. And is very good socially. Because, she trusts herself and can make her own decisions about others and gauging... things socially.
My son was clingy at that age of 2. But not when he was younger. Normal. No biggie. Once he started Preschool and Kindergarten, he was very socially on par and adapted well. I went by his cues.
It is NORMAL, for any kid, to be apprehensive about others they do not know.
I would rather have a child that was aware of themselves, versus a kid that just goes up to anyone.