All of the words LORD in Psalm 23 are the Hebrew word Yahweh which always refer to God Almighty, the creator of the universe. That is true everywhere you see the word LORD in capital letters. It is because the Jews thought it irreverent to say God's name.
Yahweh | Translation, Meaning, & Facts
Who do I think Jesus is? I'm glad you asked!
In Genesis he is the promised seed of the woman.
In Exodus he is the Passover lamb.
In Leviticus he is the High Priest.
In Numbers he is the star to rise out of Jacob.
In Deuteronomy he is the two laws: Love God and love your neighbor.
In Joshua he is the captain of the Lord of Hosts.
In Judges he is the covenant angel named Wonderful.
In Ruth he is the kinsman redeemer.
In Samuel he is the root and offspring of David.
In Kings he is the greater than the Temple.
In Chronicles he is the King's son.
In Ezra & Nehemiah he is the rebuilder.
In Esther he is the savior of God's people.
In Job he is the daysman.
In Psalms he is the song.
In Proverbs he is the wisdom of God.
In Ecclesiastes he is the one among a thousand.
In The Song of Solomon he is the bridegroom of the bride.
In Isaiah he is Jacob's branch.
In Jeremiah he is our righteousness.
In Lamentations he is the unbelievers' judgement.
In Ezekiel he is the true shepherd.
In Daniel he is the stone that became the head of the corner.
In Hosea he is the latter rain.
In Joel he is God's dwelling in Zion.
In Amos he is the raiser of David's tabernacle.
In Obadiah he is the deliverer on Mount Zion.
In Jonah he is our salvation.
In Micah he is the Lord of kings.
In Nahum he is the stronghold in the time of trouble.
In Habakkuk he is our joy and confidence.
In Zephaniah he is our mighty Lord.
In Haggai he is the desire of the nations.
In Zechariah he is our servant The Branch.
In Malachi he is the son of Righteousness.
In Matthew he is Jehovah's Messiah.
In Mark he is Jehovah's servant.
In Luke he is Jehovah's man.
In John he is Jehovah's Son.
In Acts he is the gift of holy spirit.
In Romans he is the believers' justification.
In Corinthians he is the believers' sanctification.
In Galatians he is the believers' righteousness.
In Ephesians he is the believers' heavenly standing.
In Philippians he is the believers' self adequacy.
In Colossians he is the believers' completeness.
In Thessalonians he is the believers' soon glorification.
In Timothy he is the faithful men.
In Titus he is the fellow-laborer.
In Philemon he is the love of a believer.
In Hebrews he is the High Priest for sin.
In James he is the royal law.
In Peter he is the pastor.
In John he is as we are.
In Jude he is the beloved.
In Revelation he is the King of kings and the Lord of lords.
Jesus is all of those things, but he isn't God. There is but one God for us and that is the Father (1 Cor 8:6).
God bless.