I know there’s the whole thing about killing a character off to show the injustice of the world or whatever, and yes you probably should avoid a twilight and genuinely kill at least one of your main or secondary characters (not just a random one which you threw in just so you can kill them)
But you don’t have to kill a character to kill them
You could break them completely, strip away everything they know and force them to become a different person, essentially killing who they were before. Even just with gradual character development you could eradicate the character that was first introduced.
You could take away their will to live, have them screaming for death, and deny them the right to die.
Have the hero become the villain. The villain become the hero.
Have the likeable become the hated.
Make your readers wish the character had died.