People sometimes wonder about the afterlife or heaven/hell being mentioned in the Old Testament.

These realities are certainly mentioned far less in the Old Testament than in the New and are never detailed.
But, in the face of immense suffering, such as Job was being subjected to, he knows that there will be a resurrection where he will stand before God.