David’s second attempt to move the Ark of the Covenant to Jerusalem was more successful than his previous effort for one simple reason:
1 Chronicles 15:13 Because you Levites did not carry the Ark the first time, the anger of the Lord our God burst out against us. We failed to ask God how to move it properly.
This time, they read the instructions and followed them:
1 Chronicles 15:15 Then the Levites carried the Ark of God on their shoulders with its carrying poles, just as the Lord had instructed Moses.
The key clause here is just as the Lord had instructed Moses.
Note
Here’s the scriptures covered in this section, broken up and recast into chronological order:
2 Samuel 6:12; 1 Chronicles 15:1–28; 2 Samuel 6:12–16; 1 Chronicles 15:29; 2 Samuel 6:17–19; 1 Chronicles 16:1–43; 2 Samuel 6:19–23