Endings are hard. It's hard for a story to live up to the promises it's made and the themes it's built up. But some stories manage it. An example using a scene from Terry Pratchett's Reaper Man (spoilers, obviously):
Death sat on a mountaintop. It wasn't particularly high, or bare, or sinister. No witches had held naked sabbaths on it; Discworld witches, on the whole, didn't hold with taking off any more clothes than was absolutely necessary for the business at hand. No specters haunted it. No naked little men sat on the summit dispensing wisdom, because the first thing that the truly wise man works out is that sitting around on mountaintops gives you not only hemorrhoids, but frostbitten hemorrhoids.
Occasionally people would climb the mountain and add a stone or two to the cairn at the top, if only to prove that there is nothing really damn stupid that humans won't do.
Death sat on the cairn and ran a stone down the blade of his scythe in long, deliberate strokes.
There was a movement of air. Three gray servants popped into existence.
One said, You think you have won?
One said, You think you have triumphed?
Death turned the stone in his hand, to get a fresh surface, and brought it slowly down the length of the blade.
One said, We will inform Azrael.
One said, You are only, after all, a little Death.
Death held the blade up to the moonlight, twisting it this way and that, noting the play of light on the tiny metal flecks on its edge.
Then he stood up, in one quick movement. The servants backed away hurriedly.
He reached out with the speed of a snake and grabbed a robe, pulling his empty hood level with his eye sockets.
Do you know why the prisoner in the tower watches the flight of birds? he said.
It said, Take your hands off me... oops...
Blue flame flared for a moment.
Death lowered his hand and looked around at the other two.
One said, You haven't heard the last of this.
Death lowered his head and looked around at the other two.
Here Death is confronting the – I forget their name, but the "Council of Three." These beings are the bureaucratic administrators or overseers of the Discworld. They claim to work on behalf of Azrael, who is something like the god of the Disc. They mostly seem to be in the business of causing trouble for Death, from what I recall.
As you can probably tell from the dialog this is a mixed victory for Death. He wins on some counts. But he compares himself implicitly to the prisoner in the tower who watches the birds. He's not exactly free as Death. He's just succeeded in defying them for a little while. This confrontation sums things up. Then there's the aftermath which confirms this and makes the scene complete. It tells us in no uncertain terms: Death hasn't escaped his tower; he's only been watching the birds. The aftermath goes like this:
Death brushed a speck of ash off his robe and then planted his feet squarely on the mountaintop. He raised the scythe over his head in both hands, and summoned up all the lesser Deaths that had arisen in his absence.
After a while they steamed up the mountain in a faint black wave.
They flowed together like dark mercury.
It went on for a long time and then stopped.
Death lowered the scythe and then examined himself. Yes, all there. Once again, he was the Death, containing all the deaths of the world. Except for —
For a moment he hesitated. There was one tiny area of emptiness somewhere, some fragment of his soul, something unaccounted for...
He couldn't be quite certain what it was.
He shrugged. Doubtless he'd find out. In the meantime there was a lot of work to be done...
He rode away.
Far off, in his den under the barn, the Death of Rats relaxed his determined grip on a beam.
All in all a satisfying, if not quite a good or a happy ending. Though I guess it's happy for the Death of Rats! (There's more after this that's worth reading, but this is one of the big pieces of the ending.)