We've said it before, and we'll say it again: when you've got a collection of like a gazillion stories, there's no single ending and it can be hard to pick out patterns. Here are a few you'll see repeated, though:
Young person tragically dies, goes to heaven.
Old person dies (less tragically because it was their time), goes to heaven.
Plants and animals die in captivity. Sad face.
Wicked people suffer, repent, and eventually go to heaven. Everyone wins!
A guy's social-climber crush snubs him and he dies alone. Just like in every teen sob story ever.
A young couple that's a good fit for each other actually manages to marry happily.
We will note that, in Andersen-land, most "happy" endings involve death and having faith in the Christian God so that you can go to heaven. Which is okay by us! But we wouldn't mind if some of his tales ended with kittens and ice cream either.