Contradictory Truths can exist simultaneously.
It's true that the Harry Potter books had a great deal of influence on the Millennial and Gen Z generations, shaping and inspiring them on issues like social justice, entrenched inequality, and institutional corruption. It's true that JK Rowling was possibly the first person to go from a billionaire to a millionaire due to the amount donated to Charity. It's true that Luminos, her main charity, has done great things for literacy in underprivileged children.
(Dolly Parton never made it to Billionaire status, even thought she's a better person who has done even more for charity)
It's also true that she's an unashamed TERF and Transphobe. It's also true that her writing, both in the main books and on Pottermore, relies heavily on racist and bigoted stereotypes of minorities, as well as a very Colonist and Empirical mindset towards non-British cultures. It's also true a lot of older Potter fans feel betrayed and let down by someone we looked up to for a long time.
It's easy to stop buying Rowlings books, to not play Hogwarts Legacy and boycott the movies. (I must say, the quality has declined to the point where it's not exactly a struggle...). And it is important to stop spending your money on Rowling. She-Who-Shall-Not-Be-Named has stated multiple times that as long as she's still getting six-figure royalty cheques, she knows that people support her transphobic views.
It's a lot harder to stop engaging entirely. Harry Potter fanfiction is still very much a thing, particularly the semi-spitefics that go out of their way to be inclusive, explore plotholes, and just overall be better than whatever spur-of-the-moment tripe Rowling comes up with in interviews and Pottermore, both in terms of intersectionality, and in many cases, writing and consistency. Like it or not, several terms from the world of Harry Potter have made their way into popular lexicon, and I'd argue that this isn't entirely a bad thing.
"[Insert animal here] is my Patronus", one must admit, is far less racist and culturally appropriative than "__ is my Totum/Spirit Animal/Spirit Guide".
In a similar vein, "the Black Dog" is often used as a metaphor for depression and other mood disorders, but both in Celtic Mythology and Prisoner of Azkaban, the Black Dog is an omen off Death, more than despair. Not exactly the kind of hopeless message you want to give someone who is already struggling.
"I'm being stalked by Dementors", on the other hand, both invites further conversation with someone who may have asked "are you OK/how are you?" as a formulaic greeting, and is a bit more hopeful and accurate to the experience.
Dementors force you to relive the bad memories, sucking out hope and happiness. An accurate comparison to self-recrimination and Depression, But Dementors can also be fought, and driven away. Mythological Black Dogs... not so much.
As mentioned above, Harry Potter had a big impact on your average Millenniel and Gen Z. It validated the feelings that teachers played favorites, disliked some students for things beyond their control, and that authority figures weren't always right just because they were authority figures. We made friends through the fandom, honed our skills through fanfiction and fanart, and dreamed of getting our own Hogwarts letter.
Rowling's early interviews validated the nerd and the bookwork as kindred spirits. Reading became a Cool Activity, not something to be teased about. The Harry Potter fandom was a big push towards making fanfiction Mainstream, rather than something to be ashamed of.
It's hard to completely abandon Harry Potter entirely, when it was such a formative influence.
The good news is, you don't have to. Fanart and fanfiction give Rowling no royalties, and if you're the crafty sort, you can make your own wands or Hogwarts-themed accessories.
Being a Harry Potter fan can feel difficult at times. It is. Ultimately, it all comes down to what you put in and what you take away.
As long as you make a sincere effort to be inclusive and accepting, and as long as you avoid following JK Rowling down the treacherous path to TERFdom, prejudice and bigotry, you should be fine.