2 Chronicles 6:9
Notwithstanding thou shalt not build the house; but thy son which shall come forth out of thy loins, he shall build the house for my name. Notwithstanding thou shalt not build the house; but thy son which shall come forth out of thy loins, he shall build the house for my name.
The verse belongs to Solomon's prayer offered after the temple was erected. It was prayed vocally while he knelt upon a brazen scaffold in the presence and hearing of the people of Israel. Its words are preserved in Scripture.
God regarded David's desire to build a house for His name as good, yet appointed David's son Solomon to build it instead. Solomon was the promised son from David's line. His building of the completed temple fulfilled God's word to David. The temple built in that fulfillment held the ark containing the covenant God made with Israel.
God answered Solomon's prayer by sending fire from heaven that consumed the burnt offering. He further answered by appearing to Solomon by night to assure him, I have heard thy prayer. As part of that public prayer, the verse gives scriptural evidence for public prayer.