sadism
Enjoyment of another person’s suffering, sometimes including enjoyment of causing it.
In a sentence
“The story turns on the warden’s sadism and the pleasure he takes in another person’s distress.”
Change one detail
sadism
You seek out another person’s humiliation because their distress is enjoyable to you.
Can include direct and vicarious forms.
schadenfreude
A rival misses out on a prize, and their bad luck gives you a moment of pleasure.
Misfortune, rather than suffering itself, is the focus of this example. The meanings can overlap.
Read the entry for schadenfreude