Verses 1-2 highlight that the king of Tyre provided him tradesmen and timber in order to construct a palace.
Verses 3-7 detail the increase in David’s family – that he took more wives shows a moral failure on David’s part and was contrary to the law – see Deuteronomy 17:17 – a failure that would come back to haunt him later in his life.
The verses that follow (v.8-17) describe David’s first international crisis – a confrontation with an old enemy – the Philistines. When David fled from Saul’s kingdom, he became a Philistine vassal (1 Samuel 27:1-28:2) and during those years at Hebron the Philistines probably considered him as just another client king.
With his anointing as king over a reunited Israel, David became a threat that the Philistines could no longer ignore and move to mount an attack before he is able to occupy Jerusalem. But because he looked to God for his strategy and strength, he was able to repel the Philistine attack and secure independence for God’s people and end the threat of Philistine conquest and oppression.
As a result “David’s fame spread throughout every land, and the Lord made all the nations fear him.” (v.17)