Psalm 23 is so obviously about Jesus that we hardly need to say anything. The opening words of the psalm make us think immediately of our Lord’s words in John 10: “I am the good shepherd. The good shepherd gives His life for the sheep.”
But there is a difference between the two passages. In John 10 we hear the words of the good shepherd Himself: “I know My sheep, and am known by My own… My sheep hear my voice, and I know them, and they follow me.” In Psalm 23 we hear the voice of one of the sheep confessing the gracious provision of the shepherd for him: “Yea, though I walk through the valley of the shadow of death, I will fear no evil; For You are with me.” This is David not only reminding himself of the LORD’s gracious care in the present but also anticipating greater blessings in the future: “Surely goodness and mercy shall follow me all the days of my life; And I will dwell in the house of the LORD forever.” That blessing came when he died and appeared in glory, but blossomed into greater peace and joy when the good shepherd joined him there after rising and ascending to the right hand of the Father.