Like Moses, David is a shepherd for a time, in preparation for leadership over the people of Israel.
The way in which David fulfills the shepherd-ship is clear from what he tells Saul about it in 1 Samuel 17 verses 33 to 37; he risks his life for his sheep, and with God's help he defeats lion and bear.
In this way he is a pre-image of Jesus, the Good Shepherd, who lays down His life for His sheep. John 10 verse 11.
David plays the harp (kinnor) and sings. 1 Samuel 16 verse 18.
The book of Psalms contains 72 psalms that he wrote.
An appropriate example is Psalm 23, which has as its theme: “The LORD is my Shepherd.”
Trusting the Shepherd is not naive or easy. It is about knowing and following the LORD personally, even in concrete danger of death.
Several psalms express gratitude for deliverance from danger, suffering and distress.
In Psalm 22 verse 22 David prays: 'deliver me from the lion's mouth'.
Psalm 22 is also a messianic psalm, in which the suffering of Christ is prophesied.
The prophet Ezekiel announces that a Shepherd from the line of David will arise to shepherd the people. (Ezekiel 34 verse 23). The metaphor of God as Shepherd of the individual and that of David as Shepherd of the people come together in Jesus, who is both God and man. John 10 verse 14. He, Christ, is the Good Shepherd, who keeps the souls of believers. 1 Peter 2 verse 25.
1 Peter 5 verse 8:
‘Be sober-minded; be watchful. Your adversary the devil prowls around like a roaring lion, seeking someone to devour’.
Hebrews 13 verse 20 to 21:
‘Now may the God of peace who brought again from the dead our Lord Jesus, the great shepherd of the sheep, by the blood of the eternal covenant, 21 equip you with everything good that you may do his will, working in us that which is pleasing in his sight, through Jesus Christ, to whom be glory forever and ever. Amen’.