Please remember that Hogwarts Legacy has had a large amount of people working immensely hard on it for god knows how long who are not transphobic, homophobic, TERFs or otherwise, and do not support JKR’s views. Boycotting the game will hurt them more than you can imagine.
Not buying the game means no bonuses, no compensation for hours upon hours poured into working on the game, potentially no future for the studios working on it. It means actively hurting the devs and their livelihoods.
It’s okay to buy the game and hate the creator of the world, that doesn’t mean you agree with her views either. There are ways you can support the devs and still show how strongly you oppose her views

Donate to trans rights funds and charities. Support the LGBTQ+ community. Actively learn and spread knowledge. Try your damned hardest to be a better ally. Aim your anger, hurt and disappointment at Rowling, not at the devs. They didn’t ask to work on this IP.
It’s the Ubi shit all over again, direct your pain and anger where it matters - at the people causing the problems
Many devs are drastically underpaid for their work, with the promise of a fat bonus at the end of a four year project. That bonus can sometimes be as high as a year’s salary, if the game sells well. Please consider this.
But y’know we wouldn’t have this issue if pay in games was more standardised and relied less on a sales/bonus system
I’m not saying buy the game, I’m also not saying don’t buy it. I’m saying consider all parties involved, and be ready to learn! There is no right answer here, let’s make sure the right change comes out of this.