The author states much more in the preceding verses than 'that there is nothing really new in this meaningless existence in this world'. When he says 'what is crooked cannot be made straight, and what is lacking cannot be counted', he isn't actually describing 'all the works' of the previous verse.
What this verse refers to is the vanity of those works. That is, he doesn't mean that 'all the works' are crooked, but that our effort to straighten what we believe to be crooked is futile. Our effort to count what we think we are lacking is pointless.
The author observes that we spend our lives working to acquire wealth and pleasure and to improve our lot in life. This, he says, is 'vanity and striving after wind'. Not the wealth itself, but the belief that we are lacking something vital to life, and therefore our vain efforts to quantify what is lacking and to strive to attain it, as if that is our purpose in life.
He demonstrates this in chapter 2, describing his success in acquiring more wealth and possessions than anyone else, and in granting all that his heart (his body) desired. It is only when he has reached this point, where he has everything he ever wanted so that there cannot possibly be anything lacking, that he realises the futility of the effort. It gains him nothing except what is eventually passed on to someone else. He can take none of it with him on his death.
As for the futility of our efforts to make straight what is crooked, the verses immediately following give clues as to what he means:
I said in my heart, “I have acquired great wisdom, surpassing all who were over Jerusalem before me, and my heart has had great experience of wisdom and knowledge.” 17 And I applied my heart to know wisdom and to know madness and folly. I perceived that this also is but a striving after wind.' (Ecclesiastes 1:16-17)
The author is likely referring to his own attempts to guide the ways of men, to make straight the paths that his 'great experience of wisdom and knowledge' has determined to be crooked. Proverbs refers to these crooked or perverse ways frequently, as the opposite of upright or righteous actions, in the same way that 'madness and folly' here are the opposite of 'wisdom' (Proverbs 2:15; 8:8; 11:3; 17:20; 21:7; 28:6,18).
But the author then also rephrases it in the form of a rhetorical question at 7:13 - 'Consider the work of God; for who can straighten what he has made crooked?' In RSV this comes at the end of poetry suggesting that the sorrow of knowledge, wisdom and experience in life is better than the song and laughter of ignorant fools. In NIV, however, it is grouped with the advice following: to accept the good with the bad, because it all comes from God, and we cannot determine what will befall us.
"Consider what God has done:
Who can straighten
what he has made crooked?
When times are good, be happy;
but when times are bad, consider this:
God has made the one
as well as the other.
Therefore, no one can discover
anything about their future." (NIV Ecclesiastes 7:13-14)
This is backed up a number of times throughout Ecclesiastes: that we will not stop all bad things from happening simply by living wisely. To avoid the experience of adversity at all cost is to be ignorant of the realities of life - to live in darkness. As much as the author's own life appears charmed and favoured by God, wisdom and experience has taught him that fortune is not the exclusive domain of the wise and upright, nor is suffering only for fools and wicked people.
"All share a common destiny—the righteous and the wicked, the good and the bad, the clean and the unclean, those who offer sacrifices and those who do not." (NIV Ecclesiastes 9:2)
"The race is not to the swift
or the battle to the strong,
nor does food come to the wise
or wealth to the brilliant
or favor to the learned;
but time and chance happen to them all" (NIV Ecclesiastes 9:11)
So what is crooked? Life is crooked - it's not perfect, and no matter how hard we try, no one will ever live a perfectly charmed life. Sometimes, for no apparent reason and despite everything we have at our disposal or whatever we do, life sucks. Deal with it. Find joy in what you do, seek wisdom and knowledge in both the good and the bad experiences in life - because all of it is a gift from God.