Solomon wrote 3000 proverbs and collected other wise sayings; some made it into the book of Proverbs. These are the last two chapters in the introductory section.
In an alternative to don’t worry, be happy, Solomon offered us wisdom: listen to his advice about wisdom, and be happy:
8:32-36 And now, my children, listen to me:
happy are those who keep my ways.
Hear instruction and be wise,
and do not neglect it.
Happy is the one who listens to me,
watching daily at my gates,
waiting beside my doors.
For whoever finds me finds life
and obtains favour from the Lord;
but those who miss me injure themselves;
all who hate me love death.
And, much like the cost of ignoring wisdom’s call:
12 If you are wise, you are wise for yourself;
if you scoff, you alone will bear it.