The moon would affect the tides regardless of how long it’s been there. Calculating the effect of the moon’s gravity on the earth is a standard exercise in a graduate classical physics course. In essence, the moon’s gravity “squashes” the earth at the two poles, causing tides at the nearest and farthest end of the earth.