It's a common misconception that the God of the Old Testament is somehow different than the God of the New Testament, or that the plan of Salvation was different in the Old Testament as opposed to the New Testament.
We start with a principle that from the beginning of Salvation History, we find God, and God, using mediators, finds us. In Genesis, we see that there were Godly men like Enoch (Genesis 4:17-18) followed by Noah, (Genesis 5:28-32) who warned the people to turn back to God or face a cataclysm. Later, we get Abram, whose name means Father of a Nation but God renames him, Abraham, (Genesis 12, 17) which means Father of Many Nations because through Abraham's line, would come Christ who would save the world from sin and death.
From Abraham, eventually came Israel and the Israelites, which were supposed to be a light to the rest of the Nation. They had very specific rules and laws to follow, so that other nations would see that they were different. Israel being a chosen Nation and Royal Priesthood, as God told Moses in Exodus, was not to exclude others but invite others. Israel was supposed to spread the worship of the one true God but unfortunately, just the opposite happened. They fell into idolatry, and so the Scriptural narrative records that Israel was told by God, to destroy the idolatrous Nations around them but this was long after these Nations had hardened their hearts. There were cases where heathen Nations turned to God.
In the book of Jonah, we read that Jonah was directed by God to go preach in Nineveh, the capital of Assyria. Jonah refused at first because he feared Assyria would repent and later take Israel captive. Well, we know the story. Jonah was swallowed by Big Fish (Jonah 1:17) and when he was spewed out, he went to Nineveh and they listened to Jonah, they repented, and God spared them.
We can go back to Genesis and the story of Sodom and Gomorrah. (Genesis 18-19) When God told Abraham he was going to destroy these two cities. Abraham began to plead and asked God if he could find 50 just men, would He spare them. God says yes, and so it went on until Abraham asked Him if he could find 10 just men, would He spare the cities. God said, yes. (Genesis 18:16-32) So we see, that it's always been God's Will to save all those who were willing, to ask for and, receive Mercy.
So Israel, for all intents and purposes, was the Old Testament Church. Now it wasn't easy to become an Israelite. It took generations but God instructed Israel to welcome strangers that were God-fearing while throwing out the idolaters that would not repent.
When Moses fled Egypt and went to the land of Midian, he found Jethro who was Priest of the Most High God. He wound up marrying his daughter who told Jethro, a Midianite, about God. We also read in Genesis, that one of Abraham's other sons had a wife named Midian. Midian's descendants weren't part of Israel, but they came from Abraham, who taught Midian about God. Midian's descendants became Midianites. So we see that even though the Old Testament recounts Salvation History through Israel, God also was dealing with other people and would eventually draw some into Israel.
In the book of Joshua, we read about Rahab who helped the Israelites in Jericho. She was a Canaanite and prostitute yet she's actually part of the lineage of Our Lord.
In the Book of Ruth, we read about Ruth, the Moabite, whose husband died. She followed her mother-in-law to Israel, where she married Boaz and a couple of generations later, we get King David . . . all in the lineage of Jesus.
The Temple in Jerusalem had, what was called, the Court of Gentiles where non-Israelites could enter. They couldn't go further, but they were allowed in that court, so they could hear the Rabbis teach. Likewise, they were allowed to listen outside synagogues.
Now let's move on to the New Testament. Above I noted in Exodus, God called Israel a Chosen Generation and Royal Priesthood; elsewhere as well, He called them a Kingdom of Priests and Kings. Well, St. Peter in his Epistle, describes the Church in the same way so the Church took on the same role, only this time, rather than types and shadows, the Church had the Sacraments.
As we read the Gospel, we see Romans, Samaritans, and others all coming to Christ. In Acts chapter 10, we read about Cornelius, a Roman Centurion, who feared God. Peter brought him the Gospel.
- Well, how did Cornelius, learn about the One True God, that he would seek Him?
He heard it from the Jews. Likewise, Paul after preaching in the synagogues would preach to God-fearing Gentiles, who were outside listening.
That said, we need to take the Bible as a whole. The Old Testament can easily be misunderstood, if not understood in its entire context. Yes, there was a lot of law and a lot of strict laws in the Old Testament but Law, as St. Paul wrote in the Romans (Romans 7-8), the Law was a mirror against which we could see our inability to follow it on our own.
The Law was a Teacher. It teaches us about the Holiness of God and our total inability to follow the Law on our own. It teaches us that we need a Savior.
I hope this helps. Please feel free to follow up.
Warmly, Under His Mercy,