Bart D. Ehrman, Heaven and Hell: A History of the Afterlife (New York: Simon & Schuster, 2020), 133-134.
It is important to reflect back on how understandings of the afterlife shifted over time in ancient Israel. It is not necessarily the case that there was a straight linear development, that every Jew everywhere thought the same thing at the same time. On the contrary, the developments were undoubtedly uneven, taking place in different places at different times, with some thinkers never changing their views at all and others holding various views in their heads simultaneously. But, roughly, some authors see death as the end of the story; for them there is death after death but no life after death. Others focus on the life of the nation and speak of it coming back to life after being destroyed. Yet others shift the focus to the individual, and begin to imagine a resurrection not of the nation of the but of the individual, at the end of time, on the Day of Judgment. And later some begin to think that justice comes not at the end of time but at the point of death, when the righteous are rewarded with immortal souls and the wicked are punished with eternal punishments.