The story doesn't say 'the Earth' to mean 'the whole world'. Let me show you what it actually states:
Genesis 7:6 (Leningrad Codex)
וְנֹ֕חַ בֶּן־שֵׁ֥שׁ מֵאֹ֖ות שָׁנָ֑ה וְהַמַּבּ֣וּל הָיָ֔ה מַ֖יִם עַל־הָאָֽרֶץ׃
From right to left.....
And Noah - old - six - hundred - years - when the flood - came - of water - on - the land (or earth)
The Hebrew word (pronounced erets) is read as land, countries, floor, ground, region, earth (as in ground). Had the author intended the whole world, he'd have used the word תֵּבֵל (tebel) which means the world as was done here:
Job 18:18 (Leningrad Codex)
יֶ֭הְדְּפֻהוּ מֵאֹ֣ור אֶל־חֹ֑שֶׁךְ וּֽמִתֵּבֵ֥ל יְנִדֻּֽהוּ׃
From right to left......
He shall be driven - from light - into - darkness - and out of the world - chased