Matthew records an angel came to Joseph in a dream to tell him his wife was pregnant by immaculate conception. But Luke records an angel appeared to Mary to tell her the Holy Spirit would come upon her and she would be with child. So who did the angel appear to? It is plainly obvious both gospels are recording different events. Luke speaks of an angel appearing to Mary before she is pregnant, and Matthew records a dream Joseph later had after she was found to be with child. So it can be easily argued the angel appeared to both of them at different times. Matthew is clearly recording Joseph’s side of the story, so he writes about the appearance Joseph had, whereas Luke is recording Mary’s account and writes about her appearance. Neither is at odds. They are just telling different parts of the same birth narrative.