Deuteronomy 12:28-30 English Standard Version (ESV)

28. Be careful to obey all these words that I command you, that it may go well with you and with your children after you forever, when you do what is good and right in the sight of the Lord your God.

29. “When the Lord your God cuts off before you the nations whom you go in to dispossess, and you dispossess them and dwell in their land,

30. take care that you be not ensnared to follow them, after they have been destroyed before you, and that you do not inquire about their gods, saying, ‘How did these nations serve their gods?—that I also may do the same.’

Deuteronomy 12