Here God speaks of leaders as if they were shepherds and the people they led were sheep. Alternate translation: "I will give you leaders ... they will lead you" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here "heart" represents Yahweh's desire or will. The phrase "after my heart" is an idiom that describes people who do God's will. Alternate translation: "shepherds who do my will" or "shepherds who do what I want" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-idiom]])