What happens to the hundreds of millions of people who have lived and died before the age of written records?
That's an advanced question which is extremely important. As a Protestant, I was taught that Luke 16: 19-31 helps to understand the answer. Some people debate that this is a real story and say it is a parable. However, Jesus made it very clear which stories were fact and which were fiction by a certain technique.....he used names or no names. This is the only story that names 2 characters. Remember Aesops Fables, from an earlier time, employs a similar technique with no characters having names. If you study this story about Lazarus, the richman and Abraham, you will find the answers to loads of questions. Jesus gave the story to us for a reason, because he knew we would have questions about the afterlife.
In the story we have Abraham, who is in a place called Abraham's Bosom or Abraham's Side or The Waiting Place of Abraham. Abraham was a righteous prophet and yet, in this place, he is not in Heaven.....however, he has no pain there. I was taught that Abraham went to Heaven with all the other people God considered righteous at the time of Christ's death on the cross.
The temple curtain was riped from top to bottom and the new era....with the new covenant, took effect. The perfect sacrifice, the lamb of God, allowed people to enter Heaven for the first time.
God is a just and fair judge. We can be sure of that. However, teachings that state we are given more than one chance, like the doctrine for the baptism of the dead, and reincarnation do not match what Jesus is teaching us with this story. Read it carefully.....it's directly from the mouth of the savior. The rich man was given no second chance. Any teaching that contradicts these words of Christ must have flaws. I trust in the words of Christ here. God bless.
If you are interested in this topic, I have a modern day vision of a Muslim who went to Hell, and saw Jesus in the sky and cried out to him. To find out happened, just let me know.