This entire chapter is instruction from a father to his son about the value of marriage and the folly of infidelity. These are the last three verses of the chapter and offer a bottom line perspective.
In the end, God sees all we do (:21) and we will suffer the consequences of our own stupid decisions (:22). We will have no one else to blame. Our demise will not be due to our lack of knowledge or understanding, but our own lack of discipline (:23).
Yet, we don’t have to live that way. While no one’s perfect and we all make bad decisions, we don’t have to spend a lifetime doing evil deeds and living wickedly. The LORD will cause us to face our shortcomings and then empower us to experience a much more meaningful way of life.