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.
Ecclesiastes 6:2
The Preacher (Qoheleth) is having an existential conversation with his audience. What could be worse than God giving someone riches, wealth, and honor, but not letting that someone enjoy the riches, wealth, and honor? The Preacher is obviously saying that even if you could gather riches, wealth, and honor (and all such gifts do come from God), they are nothing if they cannot be enjoyed. When you sit down for a delicious dinner – thank God that you can enjoy it!