“he has set eternity in their hearts.” People have an awareness of eternity, and that there are issues beyond our present life. That God has put eternity in people’s hearts in part explains why almost all cultures have a belief in an afterlife of some kind. Yet how God brought the universe into existence, and how he will sustain it, is beyond human knowledge.
“yet not in such a way that.” The Hebrew construction that starts the sentence occurs only here, and is introducing the fact that even though God has put eternity in people’s hearts, He has done so in a way such that they cannot discover all the work that He does from beginning to end. Norbert Lohfink, in his commentary Qoheleth, has, “but not in such a way that.”