How do we know that the Torah we have today is the same text given on Mount Sinai?
The Torah was originally dictated from God to Moses, letter for letter. From there, the Midrash (
Devarim Rabba 9:9) tells us:
Before his death, Moses wrote 13 Torah Scrolls. Twelve of these were distributed to each of the 12 Tribes. The 13th was placed in the Ark of the Covenant (with the Tablets). If anyone would come and attempt to rewrite or falsify the Torah, the one in the Ark would "testify" against him. (Likewise, if he had access to the scroll in the Ark and tried to falsify it, the distributed copies would "testify" against him.)
How were the new scrolls verified? An authentic "proof text" was always kept in the Holy Temple in Jerusalem, against which all other scrolls would be checked.
Following the destruction of the Second Temple in 70 CE, the Sages would periodically perform global checks to weed out any scribal errors.