Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
KJV

Ecclesiastes 2:18

Yea, I hated all my labour which I had taken under the sun: because I should leave it unto the man that shall be after me.

Read in other translations