Is the burying of the foreskin under a new tree in the Torah? If not how is this tradition valid? Thank you
The minhag isn't explicit in the Torah. However, the connection between a young tree and brit milah does have Torah basis-- the unusual root ע.ר.ל. Indeed, in Vayikra Rabbah 25:6, Rav Huna bar Kappara explains that Avraham learned the place of brit milah from the Gezeirah Shava.
As per your question about the validity of the minhag, it needs no De'Orayta (Torah) basis for validity. Consider Rabbinic Mitzvot such as Chanukah and Purim, which lack (explicit) mention in the Torah, and the minhag of eating sufganiyot, which Rav Maimon ben Yosef, the father of the Rambam, considered an obligation (in his arabic commentary on the Siddur).