David found strength from God.
I Samuel 30:6b
(KJV) ...but David encouraged himself in the LORD his God.
(NAS) ...but David strengthened himself in the LORD his God.
(NLT)...but David found strehgth in the LORD his God.
וַיִּתְחַזֵּ֣ק (Strong's #2388) is the word for "encouraged" or "found strength."
It has meanings like fasten upon, seize, be strong, to bind, cleave, hold faｓt, lean, etc...
How did David become encouraged and strong? We don't have to imagine or guess what he did or how he did it because it is indicated in the original word! He cleaved to the LORD his God. That is how we stay encouraged and gain strength, too, because the word of God gives strength and life to those who find them. (proverbs)
I was greatly encouraged by the following words from Deuteronomy 4:4. The word for "cleave" is a different word from #2388 (it is #1695), but "cleave" part is the same. : )
(KJV) ...but ye that did cleave upon the LORD your God are alive every one of you today.
I once asked the LORD, "What was I doing then, when I was reading the Bible and studying the Bible, before I was diagnosed with cancer? Wasn't I reading your word?" I felt a soft small voice in my heart immediately after I said it. "These words are giving you life." This was a moment when I understood what he meant. He doesn't answer my "why" questions, but he gives me peace. Our God's kindness is great. I keep trusting Him. He is my hope. Cleaving to/clinging to/adhering to God is the best place to be.