Here David's heart is spoken of as if it were a container, and what he desired is spoken of as if it were an item in the container. AT: "David my father desired ... you desired ... to desire to do that" (See: [[rc://en/ta/man/translate/figs-metaphor]])
# for the name of Yahweh ... for my name
Possible meanings are 1) Yahweh's name represents himself. AT: "for Yahweh ... for me" or 2) Yahweh's name represents his reputation. AT: "for Yahweh's reputation ... for my reputation" (See: [[rc://en/ta/man/translate/figs-metonymy]])
# In that it was in your heart
"Because it was in your heart" or "Because you wanted"
# one who will come from your loins
"one who will be your own offspring" or "one whom you yourself will father"