In Matthew, Jesus appears to be a very Jewish Messiah who came to fulfill the prophets or the laws. He sends out his disciples only to the Jews, saying: “Go nowhere among the Gentiles, and enter no town of the Samaritans, but go rather to the lost sheep of the house of Israel" (Matt 10:5-6). Again in Matt 15:21-28, he says that he was sent only to the lost sheep of the house of Israel, refusing to hear the Canaanite woman's request. He even says it is not fair to throw children's food to the dogs, calling her dog. Even his disciples intervened in this and asked him to send her away. This view of Jesus represents Jewish exclusivism. But by her persistent, challenging faith, Jesus changed his mind accepted her request, and healed her daughter. He was transformed. Finally, he commissions his disciples to all nations after the resurrection (28:16-20). This is how the Gospel of Matthew ends. We see the very different Jesus here, different from his earlier view about the mission.
In Luke, Jesus appears to be the Messiah for the world, especially for the Gentiles. In his early ministry at Luke 4:16-30, he proclaimed the good news to the Gentiles, saying that Elijah and Elisha were sent only to the Gentiles (a widow at Zarephath and Namaan of Syria) even though there were many widows and lepers in Israel. Obviously, Jesus's hometown people at Nazareth were very furious about Jesus's sermon. He got almost killed but escaped that scene. Here we see the opposite character of the Matthean Jesus. The Lukan Jesus has a preferential option for the Gentiles. This is because Luke tries to reach the Gentile audience.