Here "heart" refers to the whole person. An Israelite king who marries foreign wives and starts to worship their false gods is spoken of as if his heart were to turn away from Yahweh. Alternate translation: "so that they do not cause him to stop honoring Yahweh and start worshiping false gods" (See: [[rc://en/ta/man/translate/figs-synecdoche]] and [[rc://en/ta/man/translate/figs-metaphor]])