I agree with a lot of the people here. I personally would never bring a character back from the dead, because that essentially destroys any emotional impact the original death scene had. And there isn't any bigger emotional impact than a loved character dying and never coming back. But I think in some stories it could work. I'm gonna use RWBY Penny as an example because hers is like, the textbook definition of what not to do when resurrecting a character.
Spoilers for RWBY volumes 3 and 7 if you care about that
So, Penny was revealed to be a robot around the end of volume 2, and gets killed in a frankly horrific scene in volume 3. Her death was a seriously big deal during the rest of volume 3 - Penny was a beloved character, torn up into shreds in front of a public audience, and so the entire FNDM was seriously depressed. Penny's and Pyrrha's deaths were the most emotionally packed of volume 3, and their deaths kinda seriously turned the story around to be a bit darker and lore-heavy.
So fast forward to volume 7, Penny is a robot right? So it makes sense she is able to come back. Except... she's back, completely normal, same personality. Rendering her initial death scene, a scene fans have mourned over for YEARS, completely meaningless.
Granted, this is based on clips of volume 7 I've seen, because I stopped watching after volume 5, so take it with a grain of salt.
I feel like the way to make the writing better (because again, I don't recommend bringing back characters, especially fan-favorite ones, if you want to go for emotional impact) is to give the character some sort of consequence or side-effect of being brought back. After all, the emotional "oomph" of the original death scene doesn't really exist anymore, so it's best to make a new one. Maybe the character suffers from memory loss upon being brought back. Maybe there are some things this character can't do anymore, such as magic, or they're too weak to lift up a sword.
Maybe have the resurrection affect other characters too. Maybe the person who brought back the dead character slowly goes insane, maybe they start dying. Maybe resurrecting the dead is considered taboo, the resurrector has to pay the consequences while the resurrectee tries to help them but realizes they can't. Bringing back a character is a HUGE deal, so treat it as one.