David knew that whoever put their trust YHWH or Yahweh would never be forsaken.
“And they that know Your name will put their trust in You: for You, LORD, have not forsaken them that seek You” (Psalm 9:10). This is a common theme given the children of Israel. We see it in Deuteronomy. “Be strong and of a good courage, fear not, nor be afraid of them: for the LORD your God, He it is that does go with you; He will not fail you, nor forsake you” (Deuteronomy 31:6).
We see in it Joshua. “There shall not any man be able to stand before you all the days of your life: as I was with Moses, so I will be with you: I will not fail you, nor forsake you. (Joshua 1:5).
And God did not fail. He sent His Son for a final sacrifice of sin, and punishment. And Now God can say through Jesus “…For He has said, I will never leave you, nor forsake you” (Hebrews 13:5).
The promise is sure through the finished work of Jesus. No one will slip out of the hands of Jesus. That includes all of us.