It can be shown from more than a few Old Testament sections that the line of descent from Noah via his son Shem, to Abraham and then the nation of Israel had significance, and that to do with later prophecies about a Redeemer.
Genesis 9:25-27 tells us quite a lot in Noah's prophetic words, but nowhere does he mention any Redeemer, let alone which line he would come through! It starts by telling us that Canaan's father was Ham, and it was Ham who disrespected Noah, his father, by telling his older brothers Shem and Japheth about their father's nakedness. So Noah, in cursing Canaan, indicated that Canaan's descendants would be even worse than Ham, and the O.T. certainly shows that that inference is warranted. Significantly, Canaanites were Caucasian - not blacks.
The blessing Noah pronounced was, significantly, on the Lord God of Shem. The chapter following, shows the table of nations from Shem, Ham and Japheth. Yet there is nothing there about Shem's line giving rise to any Redeemer.
Luke's gospel does trace it backwards to king David, then Abraham, then Shem, to Adam (3:23-38). Luke's genealogy is sufficient to show that Jesus Christ, the Redeemer, did indeed come through the line of Shem. There is no need to infer anything, because the New Testament told us, some 1,830 years ago, that that is the line of descent. But nobody said in the Old Testament that the Redeemer would come through the line of Shem. It's just that he did.
Another point is about why genealogical lists exist in the Bible. One view is that there are two genres of genealogies, one which is aimed at establishing someone's entitlement to a certain position, office or inheritance; the other aimed at establishing an unbroken chronology. The genealogies in Genesis 5 and 11, with their specific numbers and ages would place them in the second category or genre.
Luke verifies that the Genesis details show the line of descent of the Messiah (the Redeemer) but not with regard to his entitlement to a certain position, office or inheritance. Other parts of the O.T. show that. But the crunch point (for me) is that only looking at a natural, human line of descent for the man, Jesus, is to view the Redeemer with blinkers on. Only when the Word of God is revealed to be the uncreated, only-begotten Son of God, who came from heaven to be born as the virgin's child, can we grasp the significance of the O.T. statements about his position and office, as the only Redeemer qualified to deal with sin.