How do we know that the accounts we've found of civilizations (E.g.Egypt) weren't actually fictional literature in the way that Plato's Timaeus and Critias mentioned the island of atlantis as an allegory for pride being a downfall of nations, and some people believed that it was a real island.
I believe the answer is archeology. Comparing archeological evidence with contemporary or subsequent accounts is how archeologists get at the truth of their practice.
Without the historical accounts, fabulous or accurate as they may be, it would be difficult for archeologists to know what to look for. However, they do not take these accounts at face value, but seek to verify or refute the accounts, insofar as that is possible, based on their physical research, and rigorous analysis of that research.