The idea of a general resurrection (and heaven) was well expressed in very early Jewish belief.
This is relevant because it entails that the Old Testament teaches a general resurrection.
In the book of Genesis, it is implied that Adam (and those after him) faced ultimate/permanent death if and only if they transgressed one or more of God's commandments (i.e. sinned).
This is relevant because the Old Testament implies a new age will come when all who have freely aimed to submit to God will be cleansed of their sin, and be given new hearts disinclined to ever sin again. The consequence will be that death will no longer hold them, precisely because they are righteous. So the Old Testament in the book of Genesis does seem to affirm a resurrection of the righteous.
The Old testament teaches that God is all-powerful and all-good.
This is relevant because belief in a heaven—whence all evil is destroyed—is a fairly straightforward inference from these two properties, and a resurrection of the righteous dead is nearby this inference, and a natural hope for those who believe in such a God.