The shepherd boy anointed king brought down Goliath with a sling and a stone. He sinned greatly and repented greatly, he wrote many of the Psalms, and Yahweh promised that his throne would be established for ever.
Key verses
1 Samuel 13:14: But now thy kingdom shall not continue: Yahweh hath sought him a man after his own heart, and Yahweh hath commanded him to be captain over his people, because thou hast not kept that which Yahweh commanded thee.
1 Samuel 16:13: Then Samuel took the horn of oil, and anointed him in the midst of his brethren: and the Spirit of Yahweh came upon David from that day forward. So Samuel rose up, and went to Ramah.
1 Samuel 17:45: Then said David to the Philistine, Thou comest to me with a sword, and with a spear, and with a shield: but I come to thee in the name of Yahweh of hosts, the Elohim of the armies of Israel, whom thou hast defied.
2 Samuel 7:16: And thine house and thy kingdom shall be established for ever before thee: thy throne shall be established for ever.
2 Samuel 12:13: And David said unto Nathan, I have sinned against Yahweh. And Nathan said unto David, Yahweh also hath put away thy sin; thou shalt not die.
Psalms 51:10: Create in me a clean heart, O Elohim; and renew a right spirit within me.
Acts 13:22: And when he had removed him, he raised up unto them David to be their king; to whom also he gave testimony, and said, I have found David the son of Jesse, a man after mine own heart, which shall fulfil all my will.