Genealogy is important to show that Jesus is a real human being who actually existed, and is the Messiah.
Matthew traces Jesus’ lineage through Solomon, the legal line through Joseph. While Luke traces Jesus’ line through Mary (which was the biological lineage, contrary to the times because legal rights back in that society passed through the father or foster father).
Furthermore, Luke traces Jesus’ genealogy all the way back to Adam, father of the human race, and to God the Father; thereby showing His divine sonship and the salvation He brings to everyone who believes in Him.
To be saved, you must believe Jesus with no strings attached. Some people add personal beliefs they impose on others. To share one trite example, they might believe that to truly worship, you must put your hands in the air while singing and see that as the only way to fully submit to God. On a larger scale, they might hold beliefs on gay marriage, abortion, evolution, or what political party to vote for.
When it comes to being saved, it’s simple — just believe in Jesus as our Messiah, our Savior.
Trust in Him. Believe in Him.