Chapter 22 laid out the overview for those who would serve regarding the temple and Chapter 23 was focused on the first group, the Levites.
David drew lots to see who would serve, just as Joshua had done with the rest of the tribes to see their inheritance.
Wiersbe points out that the service we perform in the house of the Lord should be for the Lord. Never just filling a position; but doing it unto the Lord.
The work on the Temple could not begin until Solomon was king, and it sounds like there was much palace intrigue regarding that secession that we'll learn about in I Kings.
There was one temple, one high priest, one divine law, and one Lord to serve; but there was a diversity in gifts and ministries, not unlike the church today.
Be Restored, Warren Wiersbe
Everything was structured and designed by God through David. That is so inspiring. He cares about the details.