This is a mystery. While “fountains” suggest springs (the Hebrew is מַעְיָן or mayan, spring), the quantity of waters suggests something else. The suggestion rather is that there was a “deep” source of water beneath, or perhaps above, the earth, and that water poured in that way. Perhaps it is consistent with this text that a giant icy comet smashed into the earth, scattering water into the atmosphere which fell for 40 days, and while the water started out on the surface, it eventually sank into the crust, at which point we were left with the continents we have today. I’m not aware of any scientific evidence for such a theory. In any event, Matthew Henry points out Ps 33:7: “He gathereth the waters of the sea together as an heap: he layeth up the depth in storehouses.” The suggestion is that in the Hebrew geology in operation, there were some manner of “storehouses” of waters of the deep, which might be different from or in addition to the oceans. Note: I will not ask all the questions that could be asked about the Flood. I could ask things like, “How did the people and the animals eat on the ark? Was such a floating zoo really possible?” and “Where did all the water go?” It requires a special study.