FADEAHOLIX You can resurrect any sim that dies. There are several ways to do that if you have certain packs. These ways are via Ambrosia which only requires the base game, the Dedeathify spell if you have Realm of Magic and making a wish at the wishing well if you have the Romantic Gardens stuff pack. The most reliable and easiest of the three is the spell as all you need is a spellcaster that has learned the spell. The wishing well can be hit and miss and usually costs you 5K simoleans. All it may give you is one of the ingredients for Ambrosia rather than resurrect the sim. And you need to have the ingredients (death flower, angelfish, 1500 point buyable reward potion) and a sim with level 10 gourmet cooking to make Ambrosia.
When a sim dies, you have 90 game days before the sim is culled and the sim may run off on you as they become a not in world NPC. If you have the urn, you can extend that indefinitely 90 days at a time by using the Strengthen the Connection option. But the best thing you can do is ask or invite the ghost to join the household or move in. Doing that makes the ghost a member of the household and playable. If the ghost remains not in world, they can be hard to locate as they'll come and go. Playable ghosts don't get culled. So that gives you all the time you need to resurrect the sim. And as a playable ghost, they can continue to gain skills, etc., just like a regular sim. All three cures require the ghost to be present at the time you try to resurrect. To use the wishing well or eat Ambrosia you have to be able to control the ghost. They have to be playable, and you direct them to eat or make a wish. The spell can be cast on any ghost but the spellcaster has to be an active sim.
Hope this helps.