Exactly it always was foretold that way in prophecy through Israel’s rejection of the messiah the people of the earth would be offered salvation
what your missing is the gospel was promised to Abraham Before the law was given to Moses long before about 430 years note the promise
“And he said,
Take now thy son, thine only son Isaac, whom thou lovest, and get thee into the land of Moriah; and
offer him there for a burnt offering upon one of the mountains
which I will tell thee of.
....
Then on the third day Abraham lifted up his eyes, and saw the place afar off.
And Isaac spake unto Abraham his father, and said, My father: and he said, Here am I, my son. And he said, Behold the fire and the wood: but
where is the lamb for a burnt offering? And Abraham said, My son, God will provide himself a lamb for a burnt offering: so they went both of them together.
And the angel of the Lord called unto him out of heaven, and said, Abraham, Abraham: and he said, Here am I. And he said, Lay not thine hand upon the lad, neither do thou any thing unto him: for now I know that thou fearest God, seeing thou hast not withheld thy son, thine only son from me.....
And
the angel of the Lord called unto Abraham out of heaven the second time, And said,
By myself have I sworn, saith the Lord, for because thou hast done this thing, and hast
not withheld thy son, thine only son: That in blessing I will bless thee, and in multiplying
I will multiply thy seed as the stars of the heaven, and as the sand which is upon the sea shore; and thy seed shall possess the gate of his enemies; And in thy seed shall all the nations of the earth be blessed; because thou hast obeyed my voice.”
Genesis 22:2, 4, 7-8, 11-12, 15-18 KJV
Abraham has two sons they represent the two covenants Ishmael who was born by Sarai’s will corresponds to Sinai and moses Mediation of the law this is what is only for Israel .
Isaac is recognized as his only son because Isaac is the seed of promise who was born only because God said he would be against all logic and hope because of their age God said Isaac will be born in a year and in a year Isaac was born. Gods word and faith again ....
the gospel is not born of the mosaic law it was before the mosaic law the promise of the gospel which would include all people of the earth not only Israel