1 Samuel 17:23

23As he talked with them, behold, athe champion, the Philistine of Gath, Goliath by name, came up out of the ranks of the Philistines and spoke bthe same words as before. And David heard him.

1 Samuel 21:9-10

9And the priest said, c“The sword of Goliath the Philistine, whom you struck down in dthe Valley of Elah, behold, it is here wrapped in a cloth behind the ephod. If you will take that, take it, for there is none but that here.” And David said, “There is none like that; give it to me.”

David Flees to Gath

10And David rose and fled that day from Saul and went to eAchish the king of Gath.

2 Samuel 21:19

19And there was again war with the Philistines at Gob, and fElhanan the son of Jaare-oregim, the Bethlehemite, struck down Goliath the Gittite, gthe shaft of whose spear was like a weaver’s beam.
Contrast 1 Chronicles 20:5, which may preserve the original reading

1 Chronicles 20:5

5And there was again war with the Philistines, and Elhanan the son of iJair struck down Lahmi jthe brother of Goliath the Gittite, the shaft of whose spear was like a weaver’s beam.
Copyright information for ESV