The Book of Ecclesiastes is the critic's response to Proverbs, which states we live a good life when we fear God and follow wisdom. This book's author and the teacher believe that life is hevel, temporary and fleeting like smoke or vapor. We all try to build meaning and purpose in life apart from God, investing in pursuits and things that have no lasting meaning, but time marches on, we all die and bad things happen to good people.
In the end, the key to contentment comes from wisdom, accepting hevel, fearing God, keeping His commandments and putting our trust in Him. We remain puzzled by life's mysteries, but He will bring true justice that fuels our ability to live lives of honesty and integrity.