Deuteronomy 12:28-30 (Darby)
28 Take heed to hear all these words which I command thee, that it may be well with thee, and with thy children after thee for ever, when thou doest what is good and right in the eyes of Jehovah thy God.
29 When Jehovah thy God cutteth off from before thee the nations whither thou goest, to take possession of them, and thou hast dispossessed them, and dwellest in their land,
30 take heed to thyself that thou be not ensnared to follow after them, after that they are destroyed from before thee; and that thou inquire not after theirgods, saying, How did these nations serve theirgods? even so will I do likewise.
About Deuteronomy 12: Deuteronomy 12 gives clear laws for worship. Moses is speaking to the people before they enter Canaan. He tells them to destroy the pagan altars of the nations. They must not worship God in the same way. God demands pure worship, not mixed with idolatry. Read the study notes
3 verses · Compare in parallel · Read all of Deuteronomy 12