This is a very good question! The answer is surprising. Goliath had 4 brothers! Far from lacking faith, David was going to take on the whole family of Giants if they were also on the battlefield! See 2 Samuel 21:51-22.
Fortunately for them, the giant relatives of Goliath were not on the battlefield. After the death of Goliath, it was open season on these famous warrior giants. It became a mark of honour for an Israelite warrior to defeat these men in battle. They were no longer feared.
The genius of David's God-inspired leadership was to show that the giants we face in life can be conquered by faith. David was full of faith. He knew his enemy. He was prepared to deal with the worst-case scenario (i.e. that the 4 other giants of Goliath's family were there on the battlefield with him). Before David's defeat of Goliath, the army of Israel were terrified of the giants. Afterwards, inspired by David's faith and courage, Israel defeated these giants whenever they were encountered. Indeed, the life expectancy of a giant warrior after the death of Goliath was very poor.
It was true in David's day and it is true today. The seemingly terrifying problems we face do not stand a chance when confronted with faith and courage. If we stand up to them in the name of the LORD, they will fall and, by our Father's good grace in Jesus, son of David, son of God, we shall be victorious.
1 John 5:4 For whatever is born of God overcomes the world; and this is the victory that overcomes the world, our faith.
God bless,
Mike