When you read that book of Eccleisiastes Chapter 6 down to verse 9, it completes the narration.
What good are riches, glory, long life, and even a large family if circumstances prevent us from enjoying them? And “better is the seeing by the eyes,” or facing realities, than “the walking about of the soul [“soulful desire,” footnote],” that is, striving to gratify desires that are impossible to satisfy. The best way to live, then, is to be content with “having sustenance and covering” while enjoying wholesome things in life and focusing on maintaining a close relationship with God.
When verse 2 says "but God does not grant them the ability to enjoy them" it means that God hasn't given us everlasting life yet, due to our imperfect state.
For clarification, I used 2 bible translations KJV & NWT.