The wonderful heart of David wanted to build a magnificent house for the Lord, and while the Lord commended David for his intention, the Lord revealed that He was perfectly capable of making a house,
“And I have been with you wherever you have gone, and have cut off all your enemies from before you, and have made you a name like the name of the great men who are on the earth. Moreover I will appoint a place for My people Israel, and will plant them, that they may dwell in a place of their own and move no more; nor shall the sons of wickedness oppress them anymore, as previously, since the time that I commanded judges to be over My people Israel. Also I will subdue all your enemies. Furthermore I tell you that the Lord will build you a house” (1 Chronicles 17:8–10).
The Lord had been with David, cut off his enemies, made his name great, gave Israel a place to live, kept the sons of wickedness from oppressing Israel, and would build a house for David.
The Lord had never commanded any previous generation to build Him a house. The Lord was perfectly capable of either building it Himself, or of ordering someone to do it.
That was not a rebuke, but simply to let David know that the Lord knew what He was doing. Do you believe He knows what He is doing?