Here "the hand of God" represents his guidance as if he were guiding them with his hand. Alternate translation: "God guided the people of Judah" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Having "one heart" represents being united and agreeing. Alternate translation: "causing them to agree" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here "carry out the command" is an idiom meaning to do what was commanded. Alternate translation: "to obey the command" (See: [[rc://en/ta/man/translate/figs-idiom]])
The phrase "by the word of Yahweh" shows that the king and leaders gave their command in obedience to the word of Yahweh. Alternate translation: "the command that the king and leaders gave them in obedience to the word of Yahweh" or "what the king and the leaders commanded because of what Yahweh had said"