Some series are long stories, which, like all stories, come to an end.
Others go on forever, either a stream of adventures (in comic strips, usually), or an episodic chain of stories (in novels).
In fact, the episodic chain is the only way to handle it. It is an observation as old as Aristotle that you can't take in a story that is too large, it's impossible to keep it all in mind and perceive it as a whole. If you make one unified story of it, you are in effect creating an adventure comic-strip work.
Even the comic strips tend to be remembered for individual story lines.
If your stories have their own beginnings, middles, and ends, this can work, as long as you remember a few things.
Notoriously, however, the chain goes downhill. At one extreme, Baum didn't manage to keep the first two Oz books consistent. Others go on for a long time.
So -- how to aim for a longer chain of good stories?
The biggest difficulty may be fresh ideas, but there are other issues that I will now delve into.
After fresh ideas, a big problem is that your new story should not undermine the happy ending of the story before it.
The characters who married the end of the last story should still be happily married. And if one died, it should have been after a long marriage. Recalcitrant children have to be handled with care. If the political structure of the country was changed, the result should be an improvement, if imperfect. (I have read a series in which every book ended with a change in government. How can I believe that the third and last change will actually improve things when the first two didn't?)
Likewise the villain of the piece should not just have staggered away from what was certainly his death.
If you temper your ending in the prior work, that can help set it up. Destroying the necromancer who tried to steal the artifact can end with the hero explaining to a sidekick that if the necromancer had won, that would have been an ending. Since they defeated him, they will face new problems in the future about this artifact.
Be wary when setting up such a sequel hook in the ending. It must be built, actually, into the story. If everything is pointing to victory solving all real problems, throwing in such a hook at the end both blatantly shows the hand of the author and violates the structure of the novel.
Character change is particularly important. Your drunkard should not start drinking again. The dilettante wizard turned scholarly should not revert to idleness. The cowardly prince who learned courage should not become a coward again.
On the other hand, if a story changes characters, a sequel that is just action and no character change may disappoint your readers as too large a change in the series. So what to do?
What, in fact, to do with all the demands of a series?
The simplest way is to make the unifying theme of the series be the setting. Terry Pratchett did this for Discworld. Andre Norton did it for Witch World. No characters had to repeat. What was the setting of one story could be a distant legend for the next.
Consequently the series offers a lot of freedom to write new themes, plots, and characters in the world, to explore new aspects.
On the other hand, the setting has to be interesting enough to hold the series together and so induce people to pick up the next book more eagerly than for just the byline on it. This constrains the freedom. Each book has to appear as part of this common world.
It can help if there is -- not so much as a common problem -- but a common font of problems. The Star Wars Extended Universe had many different characters, but the restoration of the Republic was the root of them.
A more unifying way is to have a group of connected characters. The setting will glide insensibly into this. Few indeed of the Extended Universe works ran with characters having no connection to, first, the movies, and then to the other works in it.
This is the classic way to handle series in a romance. Whenever a hero and heroine avow their love, their book ends, and the next book takes up with a new couple. The old couple may appear, to act as supporting characters, and to validate their happy ending.
A common trope is for the man of whom the hero was jealous to be the hero of the next book. (Thus satisfying the fans who were unhappy for him.) A notorious trope is to introduce a large family of unmarried children -- usually all girls or all boys, though mixes are not unknown -- and the series doesn't end until every single one is married off.
In other genres, particularly fantasy, the next characters often are not present in the first book. They are the children of the first book's characters. Done well, this allows us to see those character happily married, good parents, aging graciously into mentors, and allowing us to see that the first book did improve the world. (I have seen furious complaints that the first book often did not, so avoid that.)
A large, far-flung family may allow for more variety with some unity still.
This character set allows for more unity. It sometimes allows for more flexibility in some ways; in his Sackett books, Louis L'Amour went back to the first settler in the family, to early colonial times, out of the Wild West his tales usually roved in.
On the other hand, the switching of characters may leave the readers unhappy. They may want the main character forever and ever.
So, how do you stick to the main character forever and ever?
First off, notice what I said about character development above? You don't want your main character to change. Change means that his story ends, because a line can go on forever, but arcs end.
So his character needs to be defined even in the first book to allow for a lot of adventures.
Furthermore, your character should travel. A lot. All new situations, all the time. This allows new stories to arise naturally. (A settled place where a lot of new people keep passing through may work, but I have not seen it.)
More to the point, it allows new secondary characters to arise naturally. They can join for a book or several books, have character arcs, and leave, thus giving the story character change and allowing the main character to remain forever having stories.
It also helps to make him immortal. Otherwise the readers start to calculate either how many month-long adventures he had per year, or for how many decades he's been thirty.
The first time I considered this, I drew up this list before I noticed that Doctor Who fits it to a T. That series does provide an excellent example.
“If everything is pointing to victory solving all real problems, throwing in such a hook at the end both blatantly shows the hand of the author and violates the structure of the novel.”
Example from a different medium: World of Warcraft - Wrath of the Lich King.
The Lich King was the Evil Puppetmaster of the Undead
that Blizzard had very successfully made you love to hate over the course of almost a decade before you finally got to kill him. As far as anything they ever said, he was in telepathic control of all undead, you kill him, it’s over.
Then, just before you’re about to kill him, a sage-type randomly proclaims that in fact, without him “The restless undead will be an EVEN GREATER threat!!” So somebody else has to take over and be the NEW Lich King! After all, we might want to kill him again in a later sequel…
Nothing more frustrating than the main characters who never end their story. After awhile, most readers get tired of the story and drop it.
Having a happy marriage that the main characters struggled to achieve in one book that quickly ends in the next book is almost as bad.