absolutely disagree Zombieplan and Journey
Trying to change who you are to fit in, can lead to all sorts of dificulties and mental health problems. I know from experience.
Now in my thirties I realise I am bookish, introvert and do find social interactions and making friends difficult. I am not blaming others or suggesting they are wrong or should change. But actually accepting this about myself and finding coping strategies has led to some really nice friendships and finally happiness and peace with myself.
Popularity is a double edged sword although I appreciate it is difficult for 9 year old girls to see that. The OP dd is obviously upset about it, but she will find friends if she is a nice girl, which it sounds like she is. She is also very bright, which can be a double-edged sword also.
Absolutely don't encourage your dd to aspire to an image she isn't comfortable with and certainly don't suggest it may be her that is the problem, that she just needs to work harder to fit in.
The 'popular' ones often carry their own burdens and don't always develop into confident individuals. If I had had parents who indeed supported me lovingly (as you are OP) and encouraged me to be myself and accepting of who I am, it may not have taken 32 years to reach the inner peace I have now.