Ecclesiastes is a very difficult book, but this is what Chapter 2 said to me.
Solomon has come to the conclusion that all earthly things that man does is vanity and vexation of spirit. Chapter 1 ended with Solomon recognizing that in much wisdom, and Solomon received from the LORD God more wisdom than anyone, there is much grief. In knowing and discerning everything around him, this brought much sorrow."
Chapter 2 Solomon embarks on worldly pleasures and labours but finds that all are vanity. Mirth, laughter, "what doeth it?" What good does it do? No good at all. Solomon in V3 "I sought in mine heart to give myself unto wine, and to lay hold on folly, till I might see what was that good for the sons of men, which they should do under the heaven all the days of their life."
V4-10 Solomon lists all the things that he did: He made great works; he built houses, he planted vineyards. He made gardens and orchards. He made pools of water. He got servants and maidens for his house. He had great possessions of great and small cattle above all that were in Jerusalem. He gathered silver and gold, and other treasures. He got men and women singers to entertain him, and musical instruments. He was great and increased in goods more than all that were before him. And his wisdom remained with him. He did not keep anything from him that his eyes desired, he did not withhold himself from any joy. But then the reality came to him - V11 "Then I looked on all the works that my hands had wrought, and on the labour that I had laboured to do: and, behold, all was vanity and vexation of spirit, and there was no profit under the sun."