If I recall correctly, the new adaptation of The Demon Headmaster series is based on the Total Control book from 2017. I haven't read the book, but I presume it's faithful.
The most recent teenager services I can remember are BBC Switch and Shake! on Channel 5 (partnered with Disney and Nickelodeon in the later stages of their output), but they were in the later stages of the 00's/early 10's so it has been a while.
I think I may have read that book at one point and it is completely different. The story would have to change slightly as it would be hard to adapt a 190 page book into 10 episodes of a show without adding anything. The whole thing about Dinah returning doesn’t seem like something that would be in the book, which always seemed to be (at least the reboot ones) aimed at younger kids.
This opens up the argument about whether the book will be better than the TV show/movie it was based on.
The answer is almost always that the book is better.
No end of examples of a film adaptation of a famous book that either completely misses the point, or takes liberties or makes changes for various reasons (Enders Game is a good example of this, there are certain scenes in the book that were never going to be in the film (which were also part of the reason why the characters were much older than they were in the book) and also Ender repeats his training multiple times over, getting better and better as he goes, to get geared up for the final session, which doesn't happen in the film. That sort of stuff is usually the first to go when the screenplays get written).
TV wise, well Demon Headmaster's first series used the first two books, the second used the fourth book and the third used the fifth book. Great as the first TV series was, ir was never going to be a patch on the books. You get all the character development and the back story and everything else, its usually a more fulfilling experience, whereas a TV series has to effectively introduce a bunch of characters very quickly and then get on with it.