One way I’ve dealt with the “meaninglessness” of Ecclesiastes is to view it in terms of the Old World, the old creation.
This Pauline verse seems especially relevant: If the dead do not rise, “Let us eat and drink, for tomorrow we die!” (1 Cor. 15: 32).
I’m certainly open to the Meyers/Jordan/Leithart approach of translating “vanity” or “meaninglessness” as “vapor,” and thus seeing life as fleeting. I think the resurrection best tops this off though, as life is both fleeting and permanent.
We eventually escape the problem that Solomon is stuck in his whole life.