(Exodus 32:16-25) "And the tablets were the work of God" (Exodus 32:16). The tablets were not created from the earth, but from heaven. And when the Omnipresent said to him, "Carve for yourself" (Exodus 34:1), a quarry of sapphire was created for Moses inside his tent, and he hewed from it, as it is said, "And he carved two tablets of stone" (Exodus 34:4). Forty days Moses stood on the mountain; he took the Torah and came down on the tenth of the month, on the Day of Atonement, and gave it to Israel as a statute.
The Tablets Were Hewn From Heaven and From a Quarry in the Tent
Yalkut Shimoni on Torah 392:8
(שמות לב טז-כה) וְהַלֻּחֹת מַעֲשֵׂה אֱלֹהִים הֵמָּה. הַלּוּחוֹת לֹא נִבְרְאוּ מִן הָאָרֶץ, אֶלָּא מִן הַשָּׁמַיִם, וּכְשֶׁאָמַר לוֹ הַמָּקוֹם (שמות לד, א) "פְּסָל לְךָ", מֶחְצַב שֶׁל סְנַפִּירִינוֹן נִבְרָא לְמֹשֶׁה בְּתוֹךְ אָהֳלוֹ וַחֲצָבוֹ, שֶׁנֶּאֱמַר (שם, ד) "וַיִּפְסֹל שְׁנֵי לֻחֹת אֲבָנִים". אַרְבָּעִים יוֹם עָמַד מֹשֶׁה בָּהָר, לָקַח אֶת הַתּוֹרָה וְיָרַד בֶּעָשׂוֹר לַחֹדֶשׁ, בְּיוֹם הַכִּפּוּרִים, וְהִנְחִילָהּ לְיִשְׂרָאֵל לְחֹק.