Ecclesiastes 2:21

New International Version - UK Bible (NIVUK)
For a person may labour with wisdom, knowledge and skill, and then they must leave all they own to another who has not toiled for it. This too is meaningless and a great misfortune.

Read Ecclesiastes 2:21 in other translations