Proverbs 19:8

He that getteth wisdom loveth his own soul: he that keepeth understanding shall find good.

The saying stands among Solomon's writings in the last fifteen chapters of Proverbs, composed about the year 1000 and later as one of the three thousand proverbs he wrote. It belongs to the principal portion credited to Solomon, chapters 1 to 24, brought together by him or in his time. It is a proverb in the sense of a maxim, a comparison, and a brief sententious saying, serving the declared purpose of Proverbs to know wisdom and instruction and to perceive the words of understanding. It is to be read with the invitations of Wisdom in Proverbs 8:1-11 and 9:1-12.

To get wisdom is to love one's own soul and life, since gaining it is an act of love for oneself. To keep and preserve understanding is the way to find good.