Actually, the CSB has pretty much the same story as the KJV and most other versions:
"When the Philistine started forward to attack him, David ran quickly to the battle line to meet the Philistine. David put his hand in the bag, took out a stone, slung it, and hit the Philistine on his forehead. The stone sank into his forehead, and he fell facedown to the ground. David defeated the Philistine with a sling and a stone. David overpowered the Philistine and
killed him without having a sword. David ran and stood over him. He grabbed the Philistine’s sword, pulled it from its sheath, and used it to
kill him."
The NiRV, like some other versions (such as the NLT) smooths over the difficulty of David's apparently killing Goliath twice.
In
Do Historical Matters Matter to Faith? Robert Chisholm analyzes Hebrew (which is far beyond me) and argues that the topic can be harmonized this way:
"The alleged ‘double killing’ of the Philistine in 17:50-51 can be explained reasonably when one takes a closer look at the Hebrew text. In verse 50 a
hiphil form of מוּת, ‘die,’ is collocated with ‘he struck down,’ while in verse 51 a
polel form of מוּת is used to describe how David killed the Philistine with the sword. The collocation of verbs in verse 50 has the nuance ‘dealt a mortal blow.’ The
polel of מוּת (v. 51) is used in eight other passages in the Old Testament. In three poetic texts, it appears to mean, simply, ‘kill, put to death’ (Pss. 34:21; 109:16; Jer. 20:17). But in narrative (all in Judges-Samuel) it appears to have a specialized shade of meaning, referring to finishing off someone who is already mortally wounded (Judg. 9:54; 1 Sam. 14:13; 2 Sam. 1:9-10, 16). Abimelech’s statement (Judg. 9:54) is particularly instructive—he asked the armor bearer to kill him (
polel) because otherwise people would say that a woman killed him (the verb is הָרַג, ‘kill’). So who killed Abimelech? Two answers are possible and both are correct—the woman (she delivered a mortal blow that made death certain) and the armor bearer (he delivered the death blow in the technical sense =
polel). How did David kill the Philistine? Again two answers are possible and both are correct—with a sling stone (David delivered a mortal blow with the sling that made death certain) and with the Philistine’s sword, which he used to deliver the deathblow in a technical sense (=
polel).”
That seems reasonable (from an outsider's viewpoint), but it almost seems too simple; if the text could have been harmonized that easily, why didn't someone do it earlier?