Valuing what is commanded is spoken of as if the commandments were a treasure and the person were a safe place to store the treasure. AT: "consider my commands to be as valuable as a treasure" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here "heart" represents a person's mind. The phrase "incline your heart" is an idiom that means to commit or fully dedicate one's mind to a task. AT: "try hard to understand what is wise" or "fully dedicate yourself to understanding wise teachings" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-idiom]])