It may seem like an odd question if you are already a Believer until you consider that the Children of Israel in Egypt, Abraham, not even Adam and Eve did not have the Torah as we do as Moses wrote those after the after the fact just as those who wrote of the life of Yeshua didn’t have the copies in advance of doing so.
And if people could have had a close relationship with God before having written copies of examples of how to do so why do we have all of these books of the Torah and the prophets? To answer that we need to know what the Bible is for.
“…try even harder to make your being called and chosen a certainty…For this reason, I will always remind you about these things, even though you know them and are firmly established in the truth you already have. And I consider it right to keep stirring you up with reminders, as long as I am in the tent of this body. I know that I will soon lay aside this tent of mine, as our Lord Yeshua the Messiah has made clear to me. And I will do my best to see that after my exodus, you will be able to remember these things at all times.
For when we made known to you the power and the coming of our Lord Yeshua the Messiah, we did not rely on cunningly contrived myths. On the contrary, we saw his majesty with our own eyes…Yes, we have the prophetic Word made very certain. You will do well to pay attention to it as to a light shining in a dark, murky place, until the Day dawns and the Morning Star rises in your hearts. First of all, understand this: no prophecy of Scripture is to be interpreted by an individual on his own; for never has a prophecy come as a result of human willing — on the contrary, people moved by the Ruach HaKodesh spoke a message from God.”2 Peter 1:10-21
The text makes it clear the role of the Bible was given so we can have certainty. Its role is to remind us of the important truths to build our confidence in God so we can know what was said for ourselves so we do not rely on myths. You may still ask why didn’t those who lived before have the same things written down if it was so important? Well the Torah itself provides the hint. “Altogether, Adam lived a total of 930 years, and then he died. When Seth had lived 105 years, he became the father of Enosh. After he became the father of Enosh, Seth lived 807 years and had other sons and daughters. Altogether, Seth lived a total of 912 years, and then he died.” Genesis 5:5-8 Humans who lived closer to creation were not as far removed genetically as we are from the first humans who were in prefect physical condition fresh from the hands of God.
Despite sin they were still in superior physical condition to those who were born after many years of being exposed to illnesses and multiplying genetic defects in this fallen world. And we can expect that just as life span have decreased so has our mental ability to abilities to recall verbal information unaltered. Just because we don’t have copies of everything they knew or did doesn’t mean we should make the mistake of assuming they didn’t know the principles that were put in writing later. We have many hints they God’s requirements, for example in Genesis 4:1-5 we see the sacrificial offering of a lamb was not unknown prior to Moses writing down details instructions in Leviticus 3:6-8. God in mercy understanding our great need in the future provided us with the truth in written form to help us remember God’s will along with the stories of people of faith who lived before us for encouragement, because God knew the help we would need so we should be thankful and pay attention to everything it says.