Incompetent -"David may not build a house for my name because he is a man of war and has shed blood" 1 Chr 22:8
Jealous - Commits adultery with Bathsheba
Headstrong and a murderer - Arranges for the death of Uriah.
David was all those things.
david also repented and was referred to as a man after Gods own heart
David was not incompetent before the sin, only after. He was already old by that time.
God did not allow him to build the temple because he was a man of war, not peace. Solomon had peace from the beginning.
David did gather the materials necessary to build the temple.
Because of David’s sin, he had no peace in his house until the day he died, even having to flee for his life from his own son.
The difference:
David was teachable and OBEDIENT.
Saul was not.