How do graveyards work ??

As in, how do you fill graveyards with sims from households if you’re not playing the household when the final sim dies?

Do sims’ graves just automatically move to graveyards if there’s one in the world?

Help appreciated ✨💕