David was able to slain giant Goliath because he finds strength in (1) looking unto God and trusting Him, (2) recalling what God has done in the past through him.
1 Sam 17:45 ’...but I come to you in the Name of the Lord of Hosts...’
17:11 - King Saul and all the Israelites were dismayed and terrified.
17:16 - This go on for 40 days, every morning and night, Goliath took his stand.
For more than a month, they were living in fear and weakness...