Deuteronomy 12:29-31 (WEB)
29 When the LORD your God cuts off the nations from before you where you go in to dispossess them, and you dispossess them and dwell in their land,
30 be careful that you are not ensnared to follow them after they are destroyed from before you, and that you not inquire after their gods, saying, “How do these nations serve their gods? I will do likewise.”
31 You shall not do so to the LORD your God; for every abomination to the LORD, which he hates, they have done to their gods; for they even burn their sons and their daughters in the fire to their gods.
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