If one takes the whole OT in ensemble you will see a theme
The theme of the seed. The seed of the woman would crush the head of the serpent
The serpent’s kind raped human women and mixed their seed with human seed giving rise to a hybrid of humans and heavenly beings called Nephilim
Then God opts to reset this aberration of genetic corruption by wiping out all living on the earth except Noah and his family, and some animals. Except the genome of the Nephilim survives the flood through Noah’s daughter in law’s child Canaan.
Nimrod becomes a Gibborim (Nephilim) and turns the world against God
God splits the nations, assigns them new languages, new territories and intermediary sons of God to represent them. The nations stop serving the God of heaven and start to serve the intermediaries
God starts his own race through Abraham, then Isaac and then Jacob with the intention of regaining all the nations back to himself
Fast forward to Saul the first king, David, then Solomon. Solomon loses ten tribes called Israel and his son retains two tribes Judah and Benjamin.
Israel gets a certificate of divorce and is sent into captivity. Never returns and intermingles with the nations. Bloodlines cross and now they are a mixture essentially Gentiles.
THESE are the sheep Jesus refers to when He said
“And I have other sheep that are not of this fold. I must bring them also, and they will listen to my voice. So there will be one flock, one shepherd.”
John 10:16
Jesus would bring back Israel and consequently the nations back to Himself.
This to fulfill
“Yet the number of the children of Israel shall be like the sand of the sea, which cannot be measured or numbered. And in the place where it was said to them, “You are not my people,” it shall be said to them, “Children of the living God.” And the children of Judah and the children of Israel shall be gathered together, and they shall appoint for themselves one head. And they shall go up from the land, for great shall be the day of Jezreel.”
Hosea 1:10-11
But this is not about bloodlines anymore
“But to all who did receive him, who believed in his name, he gave the right to become children of God, who were born, not of blood nor of the will of the flesh nor of the will of man, but of God.”
John 1:12-13
So essentially Jesus cast His net and by means of the divorced ten tribes of Israel He regained the nations too, under a new covenant.
“Arise, O God, judge the earth; for you shall inherit all the nations!”
Psalm 82:8
And since it was Jesus was claimed to be the Shepherd of Israel and of Judah, David’s Shepherd is Jesus Himself.
He managed not just to regain the ten lost tribes of Israel but through them all the nations. And this is what is referred to by NT authors as the commonwealth of Israel
“remember that you were at that time separated from Christ, alienated from the commonwealth of Israel and strangers to the covenants of promise, having no hope and without God in the world.”
Ephesians 2:12
And James agrees a second witness
“James, a servant of God and of the Lord Jesus Christ, To the twelve tribes in the Dispersion: Greetings.”
James 1:1
As such the Church did not replace Israel, the church IS Israel born not of bloodlines but from above under a new covenant because the first covenant was voided when Christ died on the cross and annulled the covenant of marriage on Mt Sinai. But established a better covenant
“This makes Jesus the guarantor of a better covenant.”
Hebrews 7:22
This is a really short version of a much deeper study.
But there is ample evidence that Jesus is the Shepherd of Israel and this of David.