Ecclesiastes 2:20

18 I hated all for which I had toiled under the sun, because I must leave it to the man who comes after me.

19 And who knows whether that man will be wise or foolish? Yet he will take over all the labor at which I have worked skillfully under the sun. This too is futile.

So my heart began to despair over all the labor that I had done under the sun.

21 When there is a man who has labored with wisdom, knowledge, and skill, and he must give his portion to a man who has not worked for it, this too is futile and a great evil.

22 For what does a man get for all the toil and striving with which he labors under the sun?

Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
So my heart began to despair over all the labor that I had done under the sun.
KJV
Therefore I went about to cause my heart to despair of all the labour which I took under the sun.
WEB
Therefore I began to cause my heart to despair concerning all the labor in which I had labored under the sun.
ASV
Therefore I turned about to cause my heart to despair concerning all the labor wherein I had labored under the sun.
DARBY
Then I went about to cause my heart to despair of all the labour wherewith I had laboured under the sun.
BLB
And I turned around my heart to despair over all the toil that I have toiled under the sun.
ÅB
Da begynte jeg å bli fortvilet i mitt hjerte over alt det strev som jeg hadde møyet meg med under solen;
OTB
Så mitt hjerte ble fylt med fortvilelse over alt mitt møysommelige arbeid under solen.
B1930
Da begynte jeg å bli fortvilet i mitt hjerte over alt det strev som jeg hadde møiet mig med under solen;

Study notes (Tyndale)

Original text and word study

Cross references