Matthew records forty two generations (three times fourteen) from Abraham to Christ, these being (from David onwards) the royal line, the route of the throne.
Luke records about fifty generations, via Joseph, from Christ back to Abraham, being the natural line ; it being more circuitous and involving persons of shorter longevity than royalty so there are more of them.
The line is via Joseph ; Mary's name is not mentioned. And Luke affirms that Jesus was only 'supposed' to be 'of Joseph'.
Luke also records about twenty more names from Abraham back to Adam and thence to God.
The italicised interpolation 'the son of' (employed by the KJV in Luke 3) is incorrect, not being present in the Greek text, but the names are, indeed, a genitive of origin, one would suggest.
Are these seventy, or so, 'generations' regarded by Reformed, Protestant, Trinitarians as an accurate genealogy from Christ back to Adam in 'beginning of creation'(1), and thence to God, or do such persons think otherwise ?
(1) ... but from beginning of creation male and female made them the God ... [Literal from Englishman's Greek New Testament (Stephanus Text) Mark 10:6]
απο δε αρχης κτισεως αρσεν και θηλυ εποιησεν αυτους ο θεος [Stephanus TR Mark 10:6]