Here the word "world" refers to the people who lived in it. Alternate translation: "and if God did not refrain from punishing the people who lived in the ancient world" (See: [[rc://en/ta/man/jit/figs-metonymy]])
"But protected Noah ... along with seven others." God did not destroy Noah and seven other people when he destroyed the rest of the people who lived in the ancient world.
# Noah, a herald of righteousness
"Noah, a preacher of righteousness." Possible meanings are 1) Noah taught people that they should live righteous lives, or 2) Noah warned people that the righteous God would judge them.
# when he brought a flood on the world of the ungodly
God punished ungodly people by sending a flood that killed them.