2 God gives some people wealth, possessions and honor, so that they lack nothing their hearts desire, but God does not grant them the ability to enjoy them, and strangers enjoy them instead. This is meaningless, a grievous evil.

Read Ecclesiastes 6:2 Using Other Translations

A man to whom God hath given riches, wealth, and honour, so that he wanteth nothing for his soul of all that he desireth, yet God giveth him not power to eat thereof, but a stranger eateth it: this is vanity, and it is an evil disease.
a man to whom God gives wealth, possessions, and honor, so that he lacks nothing of all that he desires, yet God does not give him power to enjoy them, but a stranger enjoys them. This is vanity; it is a grievous evil.
God gives some people great wealth and honor and everything they could ever want, but then he doesn’t give them the chance to enjoy these things. They die, and someone else, even a stranger, ends up enjoying their wealth! This is meaningless—a sickening tragedy.