Four things are called an inheritance. Israel are called an inheritance, as it is said (Deuteronomy 9:29), "And they are Your people and Your inheritance." The Land of Israel is called an inheritance, as it is said, "in the land which the LORD your God gives you as an inheritance." The Temple is called an inheritance, as it is said, "on the mountain of Your inheritance." The Torah is called an inheritance, as it is said (Numbers 21:19), "and from Mattanah to Nahaliel." The Holy One, blessed be He, said: Let Israel, who are called an inheritance, come to the Land, which is called an inheritance, and build the Temple, which is called an inheritance, by the merit of the Torah, which is called an inheritance. "The place for Your dwelling": this is one of the matters in which the throne below is aligned opposite the throne above. And so it says (Psalms 11:4), "The LORD is in His holy Temple, the LORD's throne is in heaven." And it says, "I have surely built You a house of habitation, a place for Your dwelling forever." "You have made, O LORD": the Temple is beloved before the Omnipresent, for when the Holy One, blessed be He, created His world, He created it only by an utterance, as it is said (Psalms 33:6), "By the word of the LORD the heavens were made"; but when He built the Temple, it was, as it were, a labor before Him, as it is said, "You have made, O LORD." Woe to the nations of the world, what do they hear with their ears! Behold, the Temple is called His handiwork, and yet they rose up and destroyed it. They said (Psalms 137:7), "Raze it, raze it, down to its foundation in it." Concerning this, what does it say (Jeremiah 25:30)? "The LORD roars from on high, and roars mightily over His habitation"; "and His habitation they laid waste."
Four Things Called Inheritance and the Temple as God's Handiwork
Yalkut Shimoni on Torah 253:2
אַרְבָּעָה נִקְרְאוּ נַחֲלָה. יִשְׂרָאֵל נִקְרְאוּ נַחֲלָה, שֶׁנֶּאֱמַר (דברים ט, כט) "וְהֵם עַמְּךָ וְנַחֲלָתְךָ". אֶרֶץ יִשְׂרָאֵל נִקְרֵאת נַחֲלָה, שֶׁנֶּאֱמַר "בָּאָרֶץ אֲשֶׁר ה' אֱלֹהֶיךָ נֹתֵן לְךָ נַחֲלָה". בֵּית הַמִּקְדָשׁ נִקְרָא נַחֲלָה, שֶׁנֶּאֱמַר בְּהַר נַחֲלָתְךָ. הַתּוֹרָה נִקְרֵאת נַחֲלָה, שֶׁנֶּאֱמַר (במדבר כא, יט) "וּמִמַּתָּנָה נַחֲלִיאֵל". אָמַר הַקָּדוֹשׁ בָּרוּךְ הוּא יָבֹאוּ יִשְׂרָאֵל שֶׁנִּקְרְאוּ נַחֲלָה, לָאָרֶץ שֶׁנִּקְרֵאת נַחֲלָה, וְיִבְנוּ בֵּית הַמִּקְדָשׁ שֶּׁנִּקְרָא נַחֲלָה, בִּזְכוּת הַתּוֹרָה שֶׁנִּקְרֵאת נַחֲלָה. מָכוֹן לְשִׁבְתְּךָ, זֶה אֶחָד מִן הַדְּבָרִים שֶׁכִּסֵּא שֶׁל מַטָּה מְכֻוָּן כְּנֶגֶד כִּסֵּא שֶׁל מַעְלָה. וְכֵן הוּא אוֹמֵר (תהלים יא, ד) "ה' בְּהֵיכַל קָדְשׁוֹ ה' בַּשָּׁמַיִם כִּסְאוֹ". וְאוֹמֵר "בָּנֹה בָנִיתִי בֵּית זְבֻל לָךְ מָכוֹן לְשִׁבְתְּךָ עוֹלָמִים". פָּעַלְתָּ ה', חָבִיב בֵּית הַמִּקְדָשׁ לִפְנֵי הַמָּקוֹם, כְּשֶׁבָּרָא הַקָּדוֹשׁ בָּרוּךְ הוּא אֶת עוֹלָמוֹ לֹא בְּרָאוֹ אֶלָּא בְּמַאֲמָר, שֶׁנֶּאֱמַר (תהלים לג, ו) "בִּדְבַר ה' שָׁמַיִם נַעֲשׂוּ" וְגוֹ' וּכְשֶׁבָּנָה בֵּית הַמִּקְדָשׁ כִּבְיָכוֹל פְּעֻלָּה לְפָנָיו, שֶׁנֶּאֱמַר פָּעַלְתָּ ה'. אוֹי לָהֶם לְאֻמּוֹת הָעוֹלָם מַה הֵן שׁוֹמְעִין בְּאָזְנֵיהֶם, הֲרֵי בֵּית הַמִּקְדָּשׁ קָרוּי פְּעֻלָּה לְפָנָיו וְעָמְדוּ וְהֶחֱרִיבוּ אוֹתוֹ. הֵם אָמְרוּ (שם קלז, ז) "עָרוּ עָרוּ עַד הַיְסוֹד בָּהּ", לְעִנְיָן כֵּן מַהוּ אוֹמֵר (ירמיה כה, ל) "ה' מִמָּרוֹם יִשְׁאָג וְגוֹ' שָׁאֹג יִשְׁאַג עַל נָוֵהוּ". ("עַד) [וְאֶת] "נָוֵהוּ הֵשַׁמּוּ".