If you do not want to purchase the films individually, you can use subscription services that offer download functionality. However, streaming rights for the Harry Potter series rotate frequently between services like Max (formerly HBO Max), Peacock, and Netflix (in certain regions).
How to Download Harry Potter Movies Legally: Your Ultimate Wizarding World Guide