v1-2: David gathered his men together, to bring back the ark from Kiriath Jearim, where it had been for 20 years, 1 Sam 7.1-2.
v3-5: David's desire was right, to bring the ark to Jerusalem, "the place where the Lord your God chooses to make His Name abide" (Deut 12.11).
However, the ark was placed on a new cart, which was not right. The result was death and sorrow. David followed the route of pragmatism and convenience (1 Chr 15.13), and did not consult the Lord about the proper order.
v6-11: Uzzah was sincere, trying to help, but wrong (1 Sam 6.19-20). David had to be reminded of God's holiness, and Psalms 15 and 24 reflect this aspect of God's character.
The ark had been at Uzzah's father's house for several years, and perhaps he had become over-familiar with this holy object. We must treat God's things with proper respect.
v12-15: After a gap of three months, David made a second attempt to bring up the ark, see 1 Chr 15.12-15,16; 16.1. The journey was marked by sacrifice and worship.
Just as Psalms 15 and 24 (written around this time) were full of priestly imagery, so David himself serves as priest here. He brought back the ark (v12), he made sacrifices (v13), he wore an ephod (v14), he pitched a tent (tabernacle) (v17), he offered burnt offerings and fellowship offerings (v18). He pre-figures the ultimate priest-king, Jesus Christ.
v16: David had danced before the Lord with all his might; real worship includes commitment and devotion. Michal despised David; as "Saul's daughter", she did not share David's love for the Lord; they were spiritually incompatible.
v17-18: It seems the priests actually offered the sacrifices. It seems unlikely that David would have done this, given the problems that had occurred with the use of the cart. David was, however, the driving force behind the whole event.
v19: The people all shared in God's blessing, receiving some food before they returned home.
v20: Michal's prepared speech; the tempter and accuser will make 'reasoned arguments' to discourage the people of God.
v21-22: David had danced "before the Lord", to honour Him. It was irrelevant what Michal thought. Our first responsibility is to worship God. David was not afraid of being undignified and humble; his desire was that God be exalted.
v23: Michal suffered barren-ness throughout her life. She was barren spiritually, and did not have the honour of bearing children.