I found an article that might be helpful to you as you think about your daughter's social life. I'll post the link to the complete article below but here's a quote that might be of particular interest to you:
"Like last borns, [only children] are regularly spoiled, according to Adler, and have a hard time when they don't get their own way. School can be a particularly difficult transition, as they're used to being the center of the familial universe. But all that parental focus pays off. Only children are often mature for their age. They wow people with their vocabularies, and their comfort in adult circles. Plus, all that self-entertaining fosters creativity."
So the good news is, your daughter is certainly not the only only-child to go through something like this. I think it's pretty typical for only children to have challenges getting along with friends because they don't have to do as much sharing and compromising at home every day.
The better news is, she can definitely overcome these challenges. I think the key is practice, practice, practice! Try to set up regular play dates for your daughter at your house so that she gets used to sharing her toys. Talk to her a lot about what it means to be a good friend (taking turns deciding what to play, sharing toys, listening when the other is talking, etc). Make sure her teachers know about your concerns so that they can support her socially too.