After David killed Goliath he worked with King Saul and became a great success. Saul made him a commander over many men. Saul knew God was with David. Hard work made David a success. One of the ironic results of Davids success was the king became jealous of him.
1 Samuel 18:5-16
5 Whatever mission Saul sent him on, David was so successful that Saul gave him a high rank in the army. This pleased all the troops, and Saul’s officers as well.
6 When the men were returning home after David had killed the Philistine, the women came out from all the towns of Israel to meet King Saul with singing and dancing, with joyful songs and with timbrels and lyres. 7 As they danced, they sang:
“Saul has slain his thousands,
and David his tens of thousands.”
8 Saul was very angry; this refrain displeased him greatly. “They have credited David with tens of thousands,” he thought, “but me with only thousands. What more can he get but the kingdom?” 9 And from that time on Saul kept a close eye on David.
10 The next day an evil spirit from God came forcefully on Saul. He was prophesying in his house, while David was playing the lyre, as he usually did. Saul had a spear in his hand 11 and he hurled it, saying to himself, “I’ll pin David to the wall.” But David eluded him twice.
12 Saul was afraid of David, because the Lord was with David but had departed from Saul. 13 So he sent David away from him and gave him command over a thousand men, and David led the troops in their campaigns. 14 In everything he did he had great success, because the Lord was with him. 15 When Saul saw how successful he was, he was afraid of him. 16 But all Israel and Judah loved David, because he led them in their campaigns.