The Gemara in Zevachim (116a) states that there are two covenants: one that Hashem will never again bring a mabul of destruction upon the world, and another that He will not destroy the world by any other means. Yet the Rambam (Hilchos Teshuvah 3:2) rules that if the world, becomes guilty and deserving of punishment, Hashem will wipe it out. At first glance, this appears contradictory.
However, there may be no contradiction at all. There is a fundamental difference between a mabul and a punishment. The world may reach a state where its inhabitants deserve destruction as a consequence of their sins, and therefore be punished. The Gemara in Zevachim is teaching that Hashem will not destroy the world in the manner of a mabul. The Flood was not merely a punishment; it was a reset of creation itself. This explains why its destruction extended beyond humanity and affected the entire world. The mabul was more than retribution. It was a reboot of creation.
This understanding sheds light on the covenant made with Noach. The bris guaranteed that this new form of creation would never again be nullified. As the Ramban notes, the term bris in this context is connected to the concept of beri'ah (creation). Hashem's covenant ensured the permanence of the world as a created order, even if its inhabitants might at times deserve punishment.
This also explains the Gemara in Zevachim in its discussion of Matan Torah. The nations sensed that a new covenant was being established. Their concern was not that Hashem intended to destroy the world, but rather that He was creating a new framework, a new stage of creation, that would render them obsolete. Bilam reassured them that this could not be the case, because an essential component of the covenant with Noach was that there would never again be a destruction of the world on the scale and in the category of a mabul, a destruction that resets and recreates the world itself. Instead the bris of Torah was being input into the world.