They walked with God and had a pure heart. The Bible scriptures that attest to this are:
21-24 Enoch: Enoch was sixty-five years old when his son Methuselah was born. Afterwards he lived another 300 years in fellowship with God, and produced sons and daughters; then, when he was 365, and in constant touch with God, he disappeared, for God took him!
6 Jesus told him, “I am the Way—yes, and the Truth and the Life. No one can get to the Father except by means of me.
6 For unto us a child is born; unto us a son is given; and the government shall be upon his shoulder. These will be his royal titles: “Wonderful,” “Counselor,” “The Mighty God,” “The Everlasting Father,” “The Prince of Peace.”
The child born to us is our Father, and His name is Jesus. He is the "I AM" that Moses spoke to at the burning bush.
"I AM the Lord your God". In the Christian world, we call Jesus Lord.
In Genesis 18:1, the Lord pays Abraham and Sarah a visit.
18 The Lord appeared again to Abraham while he was living in the oak grove at Mamre. This is the way it happened: One hot summer afternoon as he was sitting in the opening of his tent, 2 he suddenly noticed three men coming toward him. He sprang up and ran to meet them and welcomed them.
Jesus has always been with us, even before He was born of a human in the Old Testament. In the aboves verses, we see Jesus and Abraham together. In the New Testament, these verses are confirmed.
57 The Jewish leaders: “You aren’t even fifty years old—sure, you’ve seen Abraham!” 58 Jesus: “The absolute truth is that I was in existence before Abraham was ever born!”
19 “There was a certain rich man,” Jesus said, “who was splendidly clothed and lived each day in mirth and luxury. 20 One day Lazarus, a diseased beggar, was laid at his door. 21 As he lay there longing for scraps from the rich man’s table, the dogs would come and lick his open sores. 22 Finally the beggar died and was carried by the angels to be with Abraham in the place of the righteous dead. The rich man also died and was buried, 23 and his soul went into hell. There, in torment, he saw Lazarus in the far distance with Abraham.
24 “‘Father Abraham,’ he shouted, ‘have some pity! Send Lazarus over here if only to dip the tip of his finger in water and cool my tongue, for I am in anguish in these flames.’
25 “But Abraham said to him, ‘Son, remember that during your lifetime you had everything you wanted, and Lazarus had nothing. So now he is here being comforted and you are in anguish. 26 And besides, there is a great chasm separating us, and anyone wanting to come to you from here is stopped at its edge; and no one over there can cross to us.’
27 “Then the rich man said, ‘O Father Abraham, then please send him to my father’s home— 28 for I have five brothers—to warn them about this place of torment lest they come here when they die.’
29 “But Abraham said, ‘The Scriptures have warned them again and again. Your brothers can read them any time they want to.’
30 “The rich man replied, ‘No, Father Abraham, they won’t bother to read them. But if someone is sent to them from the dead, then they will turn from their sins.’
31 “But Abraham said, ‘If they won’t listen to Moses and the prophets, they won’t listen even though someone rises from the dead.’”
God states that sin must be paid for by blood. Abraham was going to sacrifice his own son at the Lord's request. But his son was spared, and instead a Ram was provided for the sacrifice.
There were good people before the Lord that made it into Heaven. Others were not so lucky.
In the Old Testament, one had to make sin offerings to be cleansed of their sins. But this was only a temporary measure until the time came for the perfect unblemished Lamb to sacrifice Himself as the one and only sin offering.
When Adam and Eve sinned, it was Jesus who killed the first animal, a lamb, and it was to shed blood and show the horrors of sin to humans. The reason was to show that sin leads to death, and is grievously serious.
And so, good people would be redeemed by walking with God and following the Lord's Law and the Prophets. And that is why Moses and Elijah appeared at the transfiguration. Moses was symbolic of the Law, and Elija was symbolic of the prophets.
And so, people were redeemed prior to the life, death, and ressurrection of our Lord Jesus Christ by walking in the love of God by keeping the the Torah of God. And since, according to Isaiah 9:6, we know that Jesus is God, we can make sense of his saying about the law and the prophets.
Complete Jewish Bible
18 Yes indeed! I tell you that until heaven and earth pass away, not so much as a yud or a stroke will pass from the Torah — not until everything that must happen has happened.
To keep the commandments is to Love God, Love Yourself, and Love Your Enemy. This love is unconditional. Those saved from the Old Testament times were filled with God's love, kept His Laws, and obeyed His prophets.