It depends a lot on what you mean by sequels and series. I can think of a number of writers who get better with experience, though even they peak after a certain point.
Ed McBain’s 87th Precinct mysteries were basic grind-'em-out paperback originals for the first half dozen in the 1950s, but then started to dig deeper into the characters. His work in the the 1960s and 1970s was absolutely superb. Becoming a bestselling author hurt his writing. Instead of turning out perfectly-paced and plotted taut 200-page novels, he started writing bloated, padded, slow-moving 400-page books because the idiot bestseller audience wanted heft for their dollars. For whatever reason, he’s been able to shake off this curse and his recent books have been shorter and better.
Except for the last part, you can apply exactly the same scenario to a dozen or twenty other mystery writers. Dick Francis, Len Deighton, Gavin Lyall, Donald Westlake, Ross Macdonald, even Tony Hillerman.
Even before this particular bestseller syndrome kicked in, you could find this patten. Most good mystery writers who do one major character over a lifetime have a somewhat similar arc, with the first books feeling around to establish the character; the middle period being the glory days; and the last set of books a gradual diminishing from doing the same thing for too long. Pretty much any name in the field you want to pick out of a hat, from Ellery Queen to John Dickson Carr to Rex Stout has this pattern.
I use mysteries for my examples because you can see this going back to the 1920s. Until the past couple of decades, no sf writers worked over one character or setting for decades and dozens of novels. It happens a lot today, though, so I’m sure that we’ll be seeing any number of examples in the field as time goes on.
Pratchett’s example is interesting. No question that he went from mediocre to extraordinary and that he has kept up this high level of distinction. But he does it by writing several different character-based series within a larger world rather than 80 novels about one hero. We’re seeing somewhat diminishing returns with some of the series and I’d be surprised if he didn’t start introducing new series characters and more one-shots in the future.
This illustrates the huge difference between sequels and series. You can’t do anything different in a sequel. You can squeeze a lot of experiments into a series, if you’re good.
You can’t do this with movies because you’re not allowed the learning curve. Many directors obviously do get better over time, but they can’t sit on one single character.