Many have spoken on and written about Psalm 23, and I have referred to it elsewhere.
Below a few recent thoughts on this.

Verse 1a The Lord is my Shepherd

Shepherd was common metaphor for Kings of the ancient Near East.
Lord - Hebrew : Adonai my ruler, my master.
Carries implication that you cannot receive the benefits of the Kingdom without submitting to the King.

A more common picture, in our culture, is that of someone who looks after silly (dumb, directionless, defenseless) woolly animals.

Jesus referred to himself as a shepherd - a declaration of both his Kingship and his care for his people.
(John 10:14-16) Jesus the good shepherd, Jesus knows his sheep, Jesus takes risks for his sheep, Jesus speaks to his sheep.

I belong to the shepherd, I have been bought with a price ( (Revelation 5:9), (Revelation 12:11a), (1 Corinthians 6:20a)).

My shepherd is responsible for the flock he has purchased ( (John 10:11-13)).
I am Jesus's responsibility - he takes risks and works overtime for me ( (Matthew 18:12-13), (1 Samuel 17:35).

I am reminded of this quote about the lion shepherd king "not safe but good" .

Verse 1b I shall not lack

A characteristic / common testimony of those who belong to the Shepherd - they don't lack any good thing (Psalm 34:9-10).
Revelation 12:11 Declaring the goodness of God in the face of apparent evidence to the contrary.
Psalm 34:9 speaks to people who know their identity. His sheep are "holy ones" - Hebrew kedoshim, a state of set-apartedness.

Verse 2a He makes me lie down in green pastures

The shepherd is responsible for choosing the situations / circumstances I find myself in.
Makes me does not sound nice, carries implication of a rugby tackle (Hebrews 12:11).
Lets me / Offers me are alternative readings - my responsibility to accept, or I can refuse...

Verse 2b He leads me beside quiet waters

The places he takes me are for my welfare and good - his good, pleasing and perfect will (Romans 12:2).
To test and approve God's will needs a renewed mind - comes under the need to be "born again" (John 3:3).
Being born again, not a one time event - an ongoing journey (Philippians 3:12), (Ephesians 4:12,13).

Verse 3a He refreshes (or restores) my soul

Soul from the Hebrew nephesh carries concept of respiration - the inner, animating element of life.
Restoration when drained out by activity and burdens we are not supposed to be carrying.
(Matthew 11:28-30), (Philippians 4:6-7)
Matthew 6:33 Seek first ... is a state of being, not a state of doing - priorities.

Verse 3b He guides me in paths of righteousness for His Name’s sake.

The reputation of the shepherd depends on the care he takes of the sheep, and the places he takes them to.
He guides - reliance on him - (John 10:27) My sheep hear my voice.
Paths of righteousness - places which build up & strengthen, not destroy (John 10:10).

Verse 4a Even though I walk through the valley of the shadow of death
The image of moving from one pasture to another (see v2) comes to mind.
Moving into new situations / circumstances of life requires leaving the old behind and passing through a season bereavement / grief.
To successfully complete such times of transition requires a 'death' / laying down of things from the past.
(Isaiah 43:18-19) (Romans 6:4) (Matthew 9:16-17) (Acts 2:38)
In Christ I am a new creation (2 Corinthians 5:17) (Romans 12:2)

Verse 4b I will fear no evil; For you are with me
The shepherd does not leave us alone.
(John 14:18)

Verse 4c Your rod and your staff they comfort me
The shepherd provides protection, comfort and instruction.
(2 Timothy 1:7) (John 14:26-37)

Verse 5a You prepare a table before me in the presence of my enemies
The shepherd has gone ahead and made preparation for your arrival.
He makes a public declaration of your importance to him and the favour which rests upon you.

Verse 5b You anoint my head with oil, my cup overflows
Continued picture of being welcomed, esteemed, accepted - an honoured guest.
Here we have a sense of satisfaction, fullness and joy.

Psalm 6a Surely your goodness and love will follow me all the days of my life
The shepherd always protects, always trusts, always hopes, always perseveres (1 John 4:8b) (1 Corinthians 13:4-8).

Psalm 6b And I will dwell in the house of the Lord forever
Continues the theme of having no need to fear today, no need to fear tomorrow, or the day after ... (Matthew 6:33-34).
Concluding with a promise of the resurrection (John 11:25).

Which takes us back to where we started - the Kingship of the Shepherd.
You cannot receive the benefits of the Kingdom without submitting to the King.

Acts 2:38-40

Peter replied, “Repent and be baptized, every one of you, in the name of Jesus Christ for the forgiveness of your sins.

And you will receive the gift of the Holy Spirit.

The promise is for you and your children and for all who are far off—for all whom the Lord our God will call."

With many other words he warned them; and he pleaded with them, “Save yourselves from this corrupt generation".

Acts 10:43-44

All the prophets testify about Jesus that everyone who believes in Him receives forgiveness of sins through His name.

While Peter was still speaking these words, the Holy Spirit came on all who heard the message.