I would say the number one thing to heed while writing a death scene is to make the death really mean something to the characters and story. Never kill a character just for shits and giggles or the shock value, the audience won’t be shocked, they’ll be angered or annoyed. And make sure the death makes sense and had to happen, in a sense. Which can be either technically (there was no way this death could have been avoided) or thematically (this death makes sense in the themes of the story).
I’ve got kind of a weird example though. I have exactly one death scene in my WIP so far.
Spoilers, btw, although not sure anyone here cares:
The protagonist (Navon) is the evil chosen one, and a memory-stealing villain. His parents are pro heroes, and while his father proved himself trustworthy, was informed, and decided to help his son, Navon’s mother proved she could not be trusted on something else, so Navon chose not to tell her, at least yet. Well, she catches them committing a crime, having found out her son is this evil chosen one, and proceeds to absolutely wreck Navon and all of his friends, with a little help from her sidekick. Navon is convinced she’s kidding, and only slowly accepts she’s really trying to kill them, until she suddenly reveals, yes, she actually was kidding. She wasn’t planning to kill Navon, she was trying to make him prove he’s still human through his reaction to such a dire situation, which he very much did.
Then she turns right around and shoots her own sidekick to death so he can’t report her son.
In a technical sense, this death was pointless, and Navon points this out as the sidekick is bleeding to death: his memory could’ve been wiped, that’s what Navon does to all his other victims. But his mother’s response is “I didn’t know.” And this scene and the whole fight that resulted in the death establish something: This is what happens when Navon doesn’t trust his mom, making her a huge threat he has no choice but to humor, even if he’s spiteful and terrified of her, because she is stronger than the entire rest of his villain organization combined, and if he or his friends ever genuinely cross her, she will kill them without hesitation or remorse.
It’s not about the sidekick’s death being sad, the reader hardly knew him, and most of what they knew is that he thoroughly believed Navon wasn’t human and should not be treated as such. It’s about the scene showing how merciful Navon is, even to someone who’s not merciful to him, and how cold his mother can be when she sees someone as a threat.
Sorry to ramble, just wanted to get some thoughts out about the topic.