Tragedy is relative
A story that ends with a sole survivor of the human race realizing she is alone could be hopeful. A story that ends up with you winning a million dollars (while watching someone else walk away with the love of your life) could be tragic. A story where you barely survive a catastrophe, and limp away injured, could be a triumph!
It's not so much what happened in a story which makes it tragic; it's what could have happened. Romeo and Juliet is tragic not merely because the protagonists die, but because they could have been happy. And if you cynically disbelieve that Romeo and Juliet could have been more than briefly happy, given the violence of their emotions and how changeable Romeo is portrayed at the beginning of the play... Well, then the tragedy falls flat, because it's just two love-struck teenagers overreacting yet again, just like when they eloped, just like when they started meeting secretly, etc.
If Romeo and Juliet lands poorly, part of the problem is your comparative expectations of what else could have happened. There's more to it, though:
Tragedy is an attitude
Someone is walking away with the love of your life. But hey, you just won a million dollars! You can find somebody else.
Compare that to: You just won a million dollars, but the woman you want to spend your life with has lost faith in you, and is leaving with another man. You're now rich, but you know you won't have the happiness you could have had with her, even without the money. Money is just money without the people you care about.
Tragedy is subjective (of course, because it's an emotional experience), and that means it requires an attitude, a frame of mind, an emotional vulnerability. A rowdy, disrespectful crowd of high schoolers might crack jokes during Schindler's List, where if they had sat and watched it separately, they might have been in the right frame of mind to be moved by the tragedy of it. Likewise, the feel of a story will be different if the character subject to a tragedy has a sympathetic attitude (determined but overwhelmed?), rather than a hopeful attitude, or one so unsympathetic that a typical audience feels that character deserves whatever suffering comes.
Tragedy is personal
A quote which often gets thrown around: "One death is a tragedy, one million is a statistic."
It's not a tragedy to hear that an invading army came and killed every man, woman, and child in Verona. Well, not in the literary sense. It is a tragedy (potentially) that, as a result of a misunderstanding, two young lovers from Verona commit suicide, one after the other, because of a misunderstanding - moments before they could have escaped to happiness.
You've followed Romeo and Juliet, seen their lives and hopes. They are (supposed to be) relatable!
It's not like hearing about a refinery exploding in some state you've never visited, killing 150 people you don't know existed until they were numbers on a piece of paper. Well, it's not a tragedy until you hear about the little girl in tears because Daddy will never come home again, or the wife who can't sleep, can't bring herself to even watch TV, who just stares at the wall for hours, in shock.
So, what makes tragedy go off the rails?
- "I saw that coming a mile away"
Sometimes, a reader will disengage when realizing where a story is going. I personally checked out of Rogue One about halfway through, when I worked out that every single character of interest was going to die. If you start reading Romeo and Juliet already knowing how it ends, it's less likely to make an impression.
- "You didn't make me care"
If tragedy is personal, then when you fail to make a story personal, it isn't a tragedy. If you didn't particularly care about Romeo or Juliet, or their love affair, then what do you care whether they melodramatically kill themselves? Meh.
- "You broke my suspension of disbelief"
If a twist in a story is sufficiently absurd, your audience will check out. "And then everyone's head exploded!" If a twist is too hard or illogical, it isn't a story anymore, just words on a page, or images on a screen. When the characters stop being people, the story stops being tragic (or anything else).
Tragedy is an emotional experience, so (successful) tragedy can only happen when the audience is feeling.