Deuteronomy 12:5
3 You must tear down their altars, shatter their sacred pillars, burn up their sacred Asherah poles, and cut down the images of their gods; you must eliminate their very memory from that place. 4 You must not worship the Lord your God the way they worship. 5 But you must seek only the place he chooses from all your tribes to establish his name as his place of residence, and you must go there. 6 And there you must take your burnt offerings, your sacrifices, your tithes, the personal offerings you have prepared, your votive offerings, your freewill offerings, and the firstborn of your herds and flocks. 7 Both you and your families must feast there before the Lord your God and rejoice in all the output of your labor with which he has blessed you.
2 Samuel 7:13
11 and during the time when I appointed judges to lead my people Israel. Instead, I will give you relief from all your enemies. The Lord declares to you that he himself will build a dynastic house for you. 12 When the time comes for you to die, I will raise up your descendant, one of your own sons, to succeed you, and I will establish his kingdom. 13 He will build a house for my name, and I will make his dynasty permanent. 14 I will become his father and he will become my son. When he sins, I will correct him with the rod of men and with wounds inflicted by human beings. 15 But my loyal love will not be removed from him as I removed it from Saul, whom I removed from before you.
Notes and References
"... According to Nathan’s prophecy in 2 Samuel 7, David had expressed his desire to build an enduring Temple for the Lord, but the latter rejected his proposal without explicit justification. He postponed the task to David’s successor, saying: “And when your days are fulfilled, and you sleep with your fathers, I will set up your seed after you, who shall issue from your body [literally, bowels] ... he shall build a house for my name” (2 Samuel 7:1–17, especially verses 12–13). The origin(s) and dating of Nathan’s prophecy are widely disputed. Such debates lie beyond the scope of this book. However, Moshe Weinfeld correctly notes that the only demonstrably Deuteronomistic element in Nathan’s oracle is the reference to God’s “name” in association with the Temple (2 Samuel 7:13). The most probable terminus post quem of the oracle’s base text is the period of Solomon, who is not named, but is clearly alluded to in 2 Samuel 7:12–15, and about whom the prophecy is interpreted in 1 Kings 5:19. From a historiographical viewpoint, the necessity of requesting divine permission to build a temple in 2 Samuel 7 is widely paralleled in the ancient Near Eastern sources, particularly Mesopotamian, while divine refusal also has precedents from at least as early as “the Dynasties of Akkade and Ur III until the Neo-Babylonian period.” ..."
Kalimi, Isaac Writing and Rewriting the Story of Solomon in Ancient Israel (pp. 273-274) Cambridge University Press, 2019