Son of David is a title for al Masih, who is descended from David.
In Matthew 22:42, Jesus asks His hearers, “What do you think about the Christ? Whose son is he?” They said to him, ‘The son of David.'” The title, “son of David,” refers to the coming Messiah as a descendant of King David, the prophet who wrote the Zabur.
Jesus’ parentage is given in Matthew 1 and Luke 3. Matthew’s genealogy shows Jesus was descended from David legally through His adopted father, Joseph. Luke’s genealogy shows Jesus is physically descended from David through His mother, Mary.
Many years before the birth of Jesus, God gave the prophet David a promise which has two parts. Some parts of this prophecy apply to David’s son, King Solomon. Some apply to Jesus al Masih, the son of Mary. God said to David, “When your days are fulfilled and you lie down with your fathers, I will raise up your offspring after you, who shall come from your body, and I will establish his kingdom. He shall build a house for my name, and I will establish the throne of his kingdom forever. I will be to him a father, and he shall be to me a son. When he commits iniquity, I will discipline him with the rod of men, with the stripes of the sons of men, but my steadfast love will not depart from him, as I took it from Saul, whom I put away from before you. And your house and your kingdom shall be made sure forever before me. Your throne shall be established forever.’”” (2 Samuel 7:12–16 ESV)
In the story of Matthew 22:42-46, Jesus asks the Pharisees,”Whose son is al Masih?” They tell him that al Masih is the son of David. Then He responds with a riddle, based on David’s words in Psalm 110:1. There David said, “The LORD said unto my Lord” (Psalm 110:1 KJV). “The LORD” represents the personal name of God. Who then is the person called “my Lord”? This refers to al Masih. Earlier, the Pharisees had said correctly that al Masih was David’s son. Now, here is the riddle: if al Masih is David’s son, how can David call al Masih “Lord” (Matthew 24:45)? How can al Masih be greater than David if al Masih is David’s descendant?