Ecclesiastes continues with the narrative of everything being meaningless as Solomon poses a rhetorical question in Verse 3:
Ecc 1:3 What do people get for all their hard work under the sun?
The question answers itself, in that it doesn’t quite give us an answer. Working hard all day doesn’t really bring about any kind of eternal reward. We can slave away in our 9 to 5s our entire lives, but what good is it, if we are all destined to return to dust? Again, this is a pessimistic outlook, but when one is in The Lord and in Christ, there is an eternal direction that we are headed in, and nothing can take that away as Paul tells us:
Rom 8:38 For I am convinced that neither death, nor life, nor angels, nor principalities, nor things present, nor things to come, nor powers,
Rom 8:39 nor height, nor depth, nor any other created thing, will be able to separate us from the love of God, which is in Christ Jesus our Lord.
So Solomon paints a dark view without Christ, but the Gospel shows us the light, which never goes out, and is found exclusively in Christ Jesus.