Here "which" refers to God's word and water.
"God flooded the world that existed at that time with water and destroyed it"