1 Chronicles 17:3-4 But it happened that night that the word of God came to Nathan, saying, “Go and tell My servant David, ‘Thus says the LORD: “You shall not build Me a house to dwell in. There is a difference between doing a good thing and a godly thing. David thought it was good for him to build a temple for God but God reminded him that He is the one who called him, he did not call himself. 1 Chronicles 17:7 Now therefore, thus shall you say to My servant David, ‘Thus says the LORD of hosts: “I took you from the sheepfold, from following the sheep, to be ruler over My people Israel.
God works in us for the work He planned. We cannot complete His work, because we did not start it. Philippians 1:6 being confident of this very thing, that He who has begun a good work in you will complete it until the day of Jesus Christ.