Great response from Kristin! Other great ideas too here... I just wanted to add a couple things. There is a difference between sharing, taking turns, and even distribution...while we often use the word "sharing" for it all, kids are bound to get confused by what we really want them to do. In the case of the cookie, it really is HER cookie, right, as it is intended for her to eat herself...not split. Even if splitting the cookie, her PIECE would be "mine" to ingest in all reality. It could be that she is simply sorting this "mine vs. yours" out in her young mind, as is completely developmentally appropriate, as you mentioned. Maybe if she is saying mine in a possessive way, you could matter of factly state that yes you gave her that cookie for her to eat and there is one for everyone. Thank you for the cookie?? Your welcome sweetheart. Something like that to emphasize that each have their own so no need to be possessive, and to promote gratitude recognition. Commentating like this helps to develop a heart of gratitude as your child grows, recognizing things given to her, as opposed to the focus being on a negative of feeling like things are always taken from her in the name of "sharing" when she developmentally genuinely thinks they are HERS.
As far as "sharing" toys. Some toys can be shared (played with simultaneously) while others really can't. With the toys they can't "share", they certainly can "take turns". In our house (I have 3 and 4 year old sons, as well as do home day care), the kids all know the rule that "we are not to grab toys from the hands of another", but rather wait our turn. Sometimes it's harder than other times (of course when there are multiple preschoolers working with toys in the same room), but overall it works great, as there is a secure feeling on both ends. The child with the toy knows that things are not to be snatched from them, so they are more willing to play comfortably and then move on, while the child wanting the toy knows that they will have a turn come time and then the toy will not be snatched from them without warning either. To avoid nagging one another for a turn, we most often wait for the friend to be done with a toy while playing with whatever else we choose that is available at the time, unless it's a hot item or structured play when we take turns for a given amount of time, so they know when it's time to pass the toy on to another, so they have that fair warning and a sense of equality.
I've also used the natural consequences/reasoning in terms of...that's okay if you don't want to share that, but then we won't share _______ with you (using something she really likes that's comparable) or actually it is mine that I shared with you(if it is), isn't that so nice when people share with you, everybody likes when we share nice things with them.
So just a few thoughts, ideas for what it's worth. Hope it helps...
Best wishes! :)