14 In the day of prosperity be joyful, but in the day of adversity, consider: God has made the one as well as the other, so that no one can discover anything that will come after him. (Ecclesiastes 7:14 CSB)
I write quite a lot about the duality of prosperity and adversity. Mainly because this is what I hear people questioning in life the most. We thank God for one while questioning God about the other. This is why the latter part of this scripture may seem confusing.
God wants us to accept both in light of what He has done for us in eternity. Furthermore, he does not want us to question what we cannot discover. What is to come we are not to know, but we are to trust in God no matter what.
This is the core meaning behind this line of scripture – trust in God no matter what.