Look at how David’s attitude changes.
He goes from crying out and complaining to God about his life, he settles down a bit and recognizes that God is the one who is able to help, he then commits the problem to God.
He wants to be free from the worry and heartache enough to just focus on praising God.
He wanted to praise God more than he wanted delivered.
He doesn’t say set me free so I can enjoy my life.
He wants to be set free from the fear of the situation more than just the running part.
“God, I don’t want to worry about this anymore, I just want to focus on praising you and letting you handle it.”