TT #23 · Parashas Noach · Second Aliyah · Passuk 7:10
And it came to pass after the seven days that the waters of the Flood were upon the earth.
Torah Temimah points to the midrash that Hashem gave them a foretaste of the World to Come (Tosefta Sotah / parallel).
Sefaria — Tosefta Sotah (related)
English: “After the seven days” — What is the nature of these seven days? That the Holy One, blessed be He, gave them a taste of the World to Come, so that they would know what goodness they had forfeited.
Custom (the seven days as a pedagogical foretaste of lost goodness).
Hashem granted the generation seven days of heightened pleasure so they would know the goodness they were about to lose.