4 After the LORD your God has driven them out before you, do not say to yourself, “The LORD has brought me here to take possession of this land because of my righteousness.” No, it is on account of the wickedness of these nations that the LORD is going to drive them out before you.

Read Deuteronomy 9:4 Using Other Translations

Speak not thou in thine heart, after that the LORD thy God hath cast them out from before thee, saying, For my righteousness the LORD hath brought me in to possess this land: but for the wickedness of these nations the LORD doth drive them out from before thee.
"Do not say in your heart, after the LORD your God has thrust them out before you, 'It is because of my righteousness that the LORD has brought me in to possess this land,' whereas it is because of the wickedness of these nations that the LORD is driving them out before you.
“After the LORD your God has done this for you, don’t say in your hearts, ‘The LORD has given us this land because we are such good people!’ No, it is because of the wickedness of the other nations that he is pushing them out of your way.