Ecclesiastes 6:1-5 NIV

1 I have seen another evil under the sun, and it weighs heavily on mankind:
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.

References for Ecclesiastes 6:2

3 A man may have a hundred children and live many years; yet no matter how long he lives, if he cannot enjoy his prosperity and does not receive proper burial, I say that a stillborn child is better off than he.

References for Ecclesiastes 6:3

4 It comes without meaning, it departs in darkness, and in darkness its name is shrouded.
5 Though it never saw the sun or knew anything, it has more rest than does that man—