Here "heart" represents Yahweh's desire or will. The phrase "man after his own heart" is an idiom that means to be a person who does what Yahweh desires. AT: "a man who is the kind of person he wants" or "a man who will obey him" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-idiom]])