How a person lives determines what happens to their soul after they die

Ezekiel 33:8-9

When I tell the wicked, ‘O wicked man, you will surely die,’ and you don’t speak to warn the wicked from his way; that wicked man will die in his iniquity, but I will require his blood at your hand. Nevertheless, if you warn the wicked of his way to turn from it, and he doesn’t turn from his way; he will die in his iniquity, but you have delivered your soul.

from What Does the Bible Say About Death? list