Saul was chosen by God and anointed by Samuel to be the king of Israel (9:17; 10:1, 24).
Saul disobeyed God's word at least twice so that he lost his kingship and his kingdom (13:13-14; 15:19, 23; 28:17-19). When Saul disobeyed God in chapter fifteen, he actually rebelled against Him. Thus, in this chapter Samuel told Saul, "Rebellion is like the sin of divination,/And insubordination is like idolatry and teraphim" (v. 23a). To practice divination is to have contact with evil spirits, something that is utterly contrary to God's principle. What Saul did in rebelling against God was like this sin of divination. Saul was not subordinate to God and in fact became an enemy to God. As a result, he lost his kingship.
Saul's ambition to have the kingdom for himself and for his son, with his jealousy of David, confiscated and ended his enjoyment of the good land promised by God (20:30-34).
First, David was chosen and anointed by God through Samuel (16:1, 12-13). After David slew Goliath he was praised by the women of Israel as higher than Saul (18:7).
With David there is no hint that he was made proud nor that he became ambitious for the kingship.
After David was anointed and before he was enthroned as the king of Israel, he went through the trial of Saul's persecution for about seven years, from about 10631057 B.C. While he was under the trial, he was approved to be the right one to carry out God's economy by establishing the kingdom of God on the earth.