J.K. Rowling co-produced the Harry Potter film series beginning with Harry Potter and the Deathly Hallows – Part 1.
Rowling served as a producer on the final two Harry Potter films: Harry Potter and the Deathly Hallows – Part 1 and Harry Potter and the Deathly Hallows – Part 2. The two films adapted the final novel, which was divided into two cinematic releases.
Her producer role gave her a more direct position in the film-making process than her earlier author role, although she had been involved with the adaptations throughout the franchise. David Heyman was the principal producer across the film series.
The question refers to the Harry Potter films, not the later Fantastic Beasts films. Rowling wrote the screenplays for Fantastic Beasts, but that is a separate film series set in the same broader Wizarding World.