The Harry Potter movies are leaving HBO Max in August as per the original deal signed between HBO Max and the NBC Universal streaming platform.
As you remember, Harry Potter movies were available to stream on HBO Max when it was launched in May 2020. However, after mere 90 days, they left for Peacock, then recently launched the NBC Universal streaming platform.
All eight movies returned to HBO Max with a 12-monthly contract deal, expiring on 31st August 2022.
The good news is that not all Harry Potter content will be gone from HBO Max. Harry Potter 20th Anniversary and all of the Fantastic Beasts and Where to Find them would still be available to stream on HBO Max.
The bad news is that you will need the whole package (HBO Max + Peacock) to stream the entire Harry Potter catalog.