1 Sam 13:14, Acts 13:22-23, Jn 19:30
In the Old Testament, God appointed David as the king of Israel. (1 Samuel 16:12-13)
1 Samuel 16:12 And he sent, and brought him in. Now he was ruddy, and withal of a beautiful countenance, and goodly to look to. And the Lord said, Arise, anoint him: for this is he. 13 Then Samuel took the horn of oil, and anointed him in the midst of his brethren: and the Spirit of the Lord came upon David from that day forward. So Samuel rose up, and went to Ramah.
In the Old Testament, King Saul did not obey God's will, so King Saul's reign came to an end. (1 Samuel 13:14)
1 Samuel 13:14 But now thy kingdom shall not continue: the Lord hath sought him a man after his own heart, and the Lord hath commanded him to be captain over his people, because thou hast not kept that which the Lord commanded thee.
Jesus is the true King who completely fulfilled God's will. (Acts 13:22-23)
Acts 13:22 And when he had removed him, he raised up unto them David to be their king; to whom also he gave their testimony, and said, I have found David the son of Jesse, a man after mine own heart, which shall fulfil all my will. 23 Of this man's seed hath God according to his promise raised unto Israel a Saviour, Jesus:
Jesus fulfilled God's will by dying on the cross for the forgiveness of our sins. (John 19:30)
John 19:30 When Jesus therefore had received the vinegar, he said, It is finished: and he bowed his head, and gave up the ghost.