When taking a series of books and turning them into films, there are bound to be differences. J.K. Rowling's Harry Potter series is no exception, and that includes the number of films that came out of the seven books about Harry's ongoing battle with the Dark Lord Voldemort. In total, there are eight films in the franchise, with the seventh and final book, Harry Potter and the Deathly Hallows being split in two to ensure a satisfying conclusion to the story as a whole.
Source:https://www.cbr.com/harry-potter-movies-how-many-release-order/