"She found the key to my heart."
Translation:Sie hat den Schlüssel zu meinem Herzen gefunden.
I think you intend "des meinen Herzes" to mean "of my heart". But "des" is a definite article; it means "the", not "of". The "of" meaning is expressed by the genitive case, not by a word. So you put "mein Herz" ("my heart") in the genitive case—"meines Herzens"—to get "of my heart".
What she found was "the key to my heart." That's a single phrase. "My heart" is not an indirect object of "found." What did she find? The key to my heart.
This is different from a sentence like "She gave the key to her neighbor" (or, equivalently, "She gave her neighbor the key"). In that sentence, the verb "gave" has two objects: the direct object "the key" and the indirect object "her neighbor." What did she give? The key. (Not "the key to her neighbor.") Whom did she give it to? Her neighbor.