The writer observes that man's endeavors, no matter how successful, do not exempt him from suffering. Or death. Nothing born of a man's hand is eternal. Life is fleeting and does not guarantee happiness. All is in vain.
On the face of it, Ecclesiastes is a tale of discouragement. What's the point of living? The author supposes often throughout the chapter we might as well just eat, drink, and be merry.
Oddly, I like this tale. For in my view, life is not the point, but the journey. We are pilgrims working our way through a process of becoming who God created us to be. That takes time and effort and pruning and failing and starting over, and it's difficult and painful.
But it's not the end result. It's just life on the planet. It's just the here and now.
If we give this obstacle course our best effort, we grow and mature and begin to see the larger picture: God is calling us into relationship with Him. He loves us desperately, no matter what. It seems to take a lot of struggle before we get that. I think it's because we're stubborn and prideful and think life is about us. We're off track from Day One.
But, God is patient. And when our time on the planet is done, we'll have full understanding. In the meantime, the author of Ecclesiastes suggests we enjoy the temporary blessings we have (like newborns and chocolate) while working toward the life after this one. He concludes: "Honor God, and keep His commandments; for this is the whole duty of man." Everything else will come to an end.
I'm OK with that.