The two genealogies of our Lord are important for different reasons.
The one in Matthew is legal in character. It traces Joseph’s descent back to Abraham, through David and David’s royal descendants from Solomon to King Jehoiachin. It is designed to prove that Jesus, through Joseph his legal father, was heir to the throne of Judah and Israel.
As for the one in Luke … whose genealogy is it; Joseph’s or Mary’s? If it is Joseph’s, as some people seem to think, it is difficult to see what purpose it fulfils. If, however, it is Mary’s, it traces Jesus’ blood relationship back to Adam through Abraham and David, and so fulfils a most important role … but what is that role?