Ecclesiastes 6:2-4 New International Version - UK (NIVUK)
2 God gives some people wealth, possessions and honour, 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.
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. 4 It comes without meaning, it departs in darkness, and in darkness its name is shrouded.