Psalm 104 suggests an answer:
5 You who laid the foundations of the earth, So that it should not be moved forever,
6 You covered it with the deep as with a garment; The waters stood above the mountains.
7 At Your rebuke they fled; At the voice of Your thunder they hastened away.
8 They went up over the mountains; They went down into the valleys, To the place which You founded for them.
9 You have set a boundary that they may not pass over, That they may not return to cover the earth.
After the waters covered the mountains (verse 6), God rebuked them and they fled (verse 7); the mountains rose, the valleys sank down (verse 8), and God set a boundary so that they will never again cover the earth (verse 9; cf. Isaiah 54:9).
New continental landmasses bearing new mountain chains of folded rock strata were uplifted from below the globe-encircling waters that had eroded and leveled the pre-Flood topography, while large deep ocean basins were formed to receive and accommodate the Flood waters that then drained off the emerging continents.
That is why the oceans are so deep, and why there are folded mountain ranges.
In fact, fossilized sea creatures are found on top of the highest mountains on earth, showing that the layers forming the mountains were deposited under water during the Flood.
Fossilized fish, Cardipeltis bryanti, found in the Bighorn Mountains, Wyoming. This fossil is on display at the Field Museum of Natural History, Chicago, Illinois.