It’s likely that the stone cracked his skull and killed him, but it looks like David made sure of that by making a gory spectacle afterwards.
_50 So David triumphed over the Philistine with a sling and a stone; without a sword in his hand he struck down the Philistine and killed him.
51 David ran and stood over him. He took hold of the Philistine’s sword and drew it from the sheath. After he killed him, he cut off his head with the sword. _
Goliath was killed by a sword - the rock knocked him down so that David could behead him.
It’s likely that the stone cracked his skull and killed him, but it looks like David made sure of that by making a gory spectacle afterwards.
Thanks for putting the source, looks like I misremembered