Salvation for the Jews (before Christ) was to observe Torah.
Salvation for the Gentiles (everybody before even the Torah was given) was to follow their conscience.
Romans 2:15-16 NET They show that the work of the law is written in their hearts, as their conscience bears witness and their
conflicting thoughts accuse or else defend them, on the day when God
will judge the secrets of human hearts, according to my gospel through
Paul tells us that those who followed the law, whether Torah or conscience, all died:
Romans 7:10 NET and I died. So I found that the very commandment that was intended to
bring life brought death!
However, they did not go to hell. Paul says they were held in protective custody. The law acted as their guardian, pedagogos, until Christ came:
Galatians 3:24 NET Thus the law had become our guardian until Christ, so that we could be
declared righteous by faith.
IOW, the law could distinguish, and separate, and preserve, those who believed God existed and tried to follow Him, but it could not give life. They were not dead, like the people described here, who had no opportunity to come to God because of their refusal to follow the law:
Luke 9:60 NET But Jesus said to him, “Let the dead bury their own dead, but as for
you, go and proclaim the kingdom of God.”
They were kept safe, but could not taste eternaL life. Eternal life is not just immortality, but also living in synch with God, a mode of living, what Judaism calls chayei olam, the life of the world to come:
Those who believe Jesus's message have passed into eternal life, entered the Kingdom:
John 5:24-27 NET “I tell you the solemn truth, the one who hears my message and
believes the one who sent me has eternal life and will not be
condemned, but has crossed over from death to life. I tell you the
solemn truth, a time is coming – and is now here – when the dead will
hear the voice of the Son of God, and those who hear will live. For
just as the Father has life in himself, thus he has granted the Son to
have life in himself, and he has granted the Son authority to execute
judgment, because he is the Son of Man.
John 5:19-21 NET So Jesus answered them, “I tell you the solemn truth, the Son can do
nothing on his own initiative, but only what he sees the Father doing.
For whatever the Father does, the Son does likewise. For the Father
loves the Son and shows him everything he does, and will show him
greater deeds than these, so that you will be amazed. For just as the
Father raises the dead and gives them life, so also the Son gives life
to whomever he wishes.