Well, yeah. Because they know all the strength/weakness from the first game, which they can fix or improved it on the sequel. So the quality of thr next game will be better than the first game.
Of course, there's also some factors that could make the next game weren't as successful like the first one. The most common one is the game's story, which can be bad if they didn't put any effort in creating the continuation. Mass Effect series was an example of this, where the writings went bad after Mass Effect 2.
Other aspect and very common nowadays is the inclution of microtransaction aspects, which can be seen in Shadow of War or Star Wars Battlefront II. Those two games were having intrusive MTX system in their core games, and it managed to hurt the sales.
In the end, it all boils down to the desicions on the devs/publishers excecutives. Because they want to maximizing the profits, despite it could jeopardize the franchise.