In Matthew's Gospel, Joseph is the main protagonist, while Luke's story of the birth of Jesus centres on Mary and her response.
There are significant differences between the two accounts which can be understood as reflecting the particular theological perspective of each author and the way each seeks to point to the identity of Jesus and address the concerns of their communities.
Did you notice that there is no stable in Matthew's account of Jesus' birth? Jesus is born at the home of Joseph and Mary who live in Bethlehem. Look at the birth stories in Luke (1-2) and in Matthew (1-2) and see who visits the infant Jesus.