Proverbs 19:16 (ESV) “Whoever keeps the commandment keeps his life; he who despises his ways will die.”
To “despise your way” is to be dangerously careless. For example, if I know there is a cliff in the vicinity, and I run with my eyes closed in the direction of the cliff, I am despising my way.
When I was little, my mother had wisdom far in excess of my wisdom. (Even when I was an adult, her wisdom was still often far superior.) As a little boy, crossing the street without looking both ways or by not taking my mother’s hand was dangerously careless. My mother had a command: “Look both ways before you cross the street.” She gave me the command because she loved me, not because she was opposed to my quick access to the other side of the street.
God makes it very clear that if you “keep” his commandments, they are for your good, not to bring you harm or to somehow inhibit you in ways that are not in your own best interest. Psalm 19:7-11 (ESV) says it very well:
“The law of the Lord is perfect, reviving the soul; the testimony of the Lord is sure, making wise the simple; 8 the precepts of the Lord are right, rejoicing the heart; the commandment of the Lord is pure, enlightening the eyes; 9 the fear of the Lord is clean, enduring forever; the rules of the Lord are true, and righteous altogether. 10 More to be desired are they than gold, even much fine gold; sweeter also than honey and drippings of the honeycomb. 11 Moreover, by them is your servant warned; in keeping them there is great reward.”
One author says it well: “Do you care about yourself? There is a way to live that brings happiness and success, and there is a way to live that will kill you. The choice is yours. The results are God’s. The consequences are certain. Do you love or despise God’s way for living your life?” – Proverb a Day (second link below).