No one ever preached the gospel in the OT. It is Paul in Gal. 3 where he gives the church a glimpse of how Abraham initially responded to God through faith which was in reference to his future descendants that would like the stars of heaven. Paul said that the seed was Christ (Gal. 3:16). As far as the walk of faith, it began with Abraham for he is called the father of faith (Rom. 4:16).
Galatians 3:8 And the Scripture, foreseeing that God would justify[
c] the Gentiles by faith, preached the gospel beforehand to Abraham, saying, “In you shall all the nations be blessed.”
Genesis 12:1-5 Now the Lord said[
a] to Abram, “Go from your country[
b] and your kindred and your father's house to the land that I will show you. 2 And I will make of you a great nation, and I will bless you and make your name great, so that you will be a blessing. 3 I will bless those who bless you, and him who dishonors you I will curse, and in you all the families of the earth shall be blessed.” 4 So Abram went, as the Lord had told him, and Lot went with him. Abram was seventy-five years old when he departed from Haran. 5 And Abram took Sarai his wife, and Lot his brother's son, and all their possessions that they had gathered, and the people that they had acquired in Haran, and they set out to go to the land of Canaan. When they came to the land of Canaan,
The souls that they had made in Haran refers to making converts in by spreading the Gospel in accordance with with the promise. In John 8:39, Jesus said that if they were children of Abraham, then they would be doing the same works as he did, so the multiplication of the children of Abraham does not come through having physical descendants, but through teaching others to do the same works as him through faith in the promise (Romans 9:6-8). In Genesis 18:19, God knew Abraham that he would teach his children and those of his household to walk in His way by doing righteousness and justice that the Lord may bring to him all that he has promised, namely, in Genesis 26:4-5, God will multiply Abraham's offspring as the starts in the heaven, to his offspring He will give all of these lands, and through his offspring all of the nations of the earth would be blessed because Abraham heard God's voice and guarded His charge, His commandments, His statutes, and His laws. Furthermore, in Deuteronomy 30:16, if love God by walking in His way by keeping His commandments, statutes, and laws, then they shall live and multiply and God will bless them in the land that they are entering to possess, so all of the promises were made to and brought about because Abraham walked in God's way in obedience to His law and was busy spreading the Gospel by teaching his children and those of his household how to do that, and because his children did that. In Psalms 119:1-3, God's law is how the children of Abraham knew how to be blessed, so the way to inherit the promise is by blessing the nations is by teaching the nations to turn from their wickedness and how to walk in God's ways in accordance with the Gospel and Jesus was sent as the fulfillment of that promise to bless us by turning us from our wickedness (Acts 3:25-26).
The good news was never materialized in the OT since no one could be justified through the law; the gospel, on the other hand, is the good news of the finished work of Christ which no mere man can touch for if righteousness comes through the Law, Christ died needlessly (Gal. 2:21).
There can be many reasons for obeying God's law, so denying that we can earn our justification by obeying God's law does not mean that God's law does not play a role in our justification. While Paul denied that we can earn our justification as wage (Romans 4:4-5), he also said that only doers of the law will be justified (Romans 2:13), so there must be a reason why our justification requires us to choose to be doers of the law other than in order to earn it as a wage, such as faith insofar as Romans 3:31 says that our faith upholds God's law.
Now in reference to Joshua 22:1-3, you seem to be taking God’s word out of its intended context. In these verses, the eastern tribes of Reuben, Gad, and eastern Manasseh were released to return to their homes, having fulfilled their duties to their fellow Israelites west of the Jordan. Nothing to do with keeping the law since later Israel began to break the covenant of law into pieces. Have you ever read Isaiah, Jeremiah, and Ezekiel? You will notice the degrading state that Israel fell into due to their outright and willful disobedience to the commandments of God. The law cannot be kept, especially when men are fallen creatures born in desperate need of a Savior.
Pointing out that the content of these verses is referring to the eastern tribes being released to return to their homes does not detract from the fact that it directly says that they have kept all that Moses the servant of the Lord commanded you and have obeyed my voice in all that I have commanded you. The good kinds tended to live for much longer than the evil kings did, so if you add up the years, Israel was under a good king for roughly 80% of the time, which could have been better, but hardly constitutes as a complete failure to keep the law.
In Luke 1:6, both Zechariah and Elizabeth walked in all the moral commandments and ceremonial ordinances of the Lord and were considered blameless. They manifested their righteousness as it shone forth in the whole course of their conversation, in every branch of piety and virtue. To say they kept the law is to destroy the entire fabric of the NT and the epistles.
So, since you insist the gospel was in the OT, please prove your point by providing chapter and verse from the OT where the gospel was preached, providing you understand what the gospel really means.
Luke 1:6 doesn't specify anything about ceremonial or moral laws, but rather it saying that they walked blamelessly in all the commandments and statutes of the Lord, and to deny that they kept God's law is to refuse to allow the text to inform your view. There is nothing about keeping God's law that is contrary to the fabric of the NT. On the contrary, in 1 John 5:3, to love God is to keep His commandments which are not burdensome, so for you to deny that we can keep them is to deny that anyone has ever loved God and to deny that His commandments are not burdensome, and in Revelation 14:12, all those who kept faith in Jesus are those who kept God's commandments, so you denying that we can keep God's law which is what would be destroying the fabric of the NT.
Lastly, all the Law did was condemn everyone who failed to keep it.
“For the law was given through Moses; grace and truth came through Jesus Christ.” (Jn 1:17).
Nowhere does the Bible say that all the Law did was condemn everyone who failed to keep it. In Psalms 119:29, David wanted God to be gracious to him by teaching him to obey God's law, and in Psalms 119:142, God's law is truth, so grace and truth came both through the Law and through Christ because he spent his ministry teaching his followers how to keep it by word and by example.