Yahweh speaks of a person's conduct as if it were the person walking. Alternate translation: "those who conduct their lives out of devotion to their detestable things" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the metonym "conduct" represents the consequences of their actions. The idiom "bring ... on their own heads" means they will experience these consequences. Alternate translation: "I will cause them to suffer the consequences of their actions" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-idiom]])