I like both happy and tragic ends and think they're both important (although by happy end, I moreso mean the endings that are portrayed as the more "good" and complete or fulfilling ones, even if not 100% happy). In fact, sometimes it can feel incomplete without both (though of course happier ends do seem like the standard requirement at least for a feeling of fulfilment and to tie up loose ends in a story, so at the very least I think it should have that unless the whole thing is meant to be a tragedy) as they contribute to the overall narrative when taken together and seeing how the themes are interacted with in both.
Usually the tragic end shows what happens when the main theme or message isn't followed or is opposed, or otherwise offers a different perspective that enriches the overall story or theme (and the happy end through juxtaposition). I think the best tragic ends are those that directly enhance the happy end, providing both extra insight, a feeling of reward and a fuller exploration of the themes of the happy end. I guess if I had to pick one that's probably more important for a story overall to me, happier endings (as in not completely tragic) tend to feel more complete and satisfying and heartfelt, which not all media wants to achieve (which is fine), but it usually just feels like there's overall more heart and a feeling of catharsis (although I like full tragedies too and sometimes think that's the right choice for certain stories).
But when it comes to happy endings, I like when it feels earned, so there's sufficient struggle and suffering along the way in order to make the happiness actually feel cathartic and deserved, for the light to shine that much brighter. If it's just fluff the whole time with not much conflict, it feels unfulfilling and unearned, and I end up not really feeling happy and instead just empty. It's like, how can there be comfort in hurt/comfort without the hurt lmao. But yeah, without something to overcome, it just feels emotionally unfulfilling and instead just this feeling of lukewarm stasis. Happy ends also don't need to necessarily have a super joyful feeling to them? As long as there's at least this overall growth or feeling of contentment despite all that was potentially lost. Things aren't perfect but there's still a gentle warmth there, and the themes are resolved in way that overall feels kind.
Likewise, I don't like when tragic endings just come out of nowhere, like random death endings that make no sense and are just there to be shocking or something. I think just as much effort (as happy endings) should be put into tragic endings to make them feel like actual legitimate endings that are just as fleshed out, even though they're clearly telegraphed as the "bad ending" (bad endings, or endings seemingly intended to be taken that way, can provide just as much insight, at least into the writer's intended message). I feel like if nothing else, it would enhance the themes of the happy ending as stated before and refine the message the writer wants to send by showing the consequences of both sides.
So I would prefer if the tragic ends weren't just "random bad thing happens" just to check a box of having a bad ending. It should be just as meaningful and add something, say something about the overall story. And be something that stems from logical actions and events in the story, where you can understand why and how it diverged from the path to the happy end (instead of just having random bad things happen, as stated). I of course like having my heart ripped out and trampled on, but I would rather not have it be overly gratuitous where it feels like they just want to have very bad things happen just for the sake of it or to punish the player (in an extreme way).