And David gives praise (in Psalms 110:3): "Your people offer themselves willingly in the day of Your might." And from where is it shown that the righteous are partners with the Holy One, blessed be He, when He forms a form? As it is written (in I Chronicles 4:23): "These were the potters, and those that dwelt among plantations…" — that they are partners with God in every creature, as it is stated (ibid.): "They dwelt there with the king for his work." With the King of kings of kings, the Holy One, blessed be He, at His work they dwell, and they create creation. The Holy One, blessed be He, said: It is not enough that I do nothing apart from their knowledge, but rather everything that I make in this world and in the world to come is prepared for them. This is what David says (in Psalms 31:20 [19]): "How abundant is Your goodness, which You have stored up for those who fear You…"
The Righteous as God's Partners in Forming Creation
Midrash Tanchuma Buber, Toldot 11:2
ודוד מקלס עמך נדבות ביום חילך (תהלים קי ג), ומנין שהצדיקים שותפים עם הקב"ה כשהוא צר צורה, שכן כתיב המה היוצאים (יושבי) [ויושבי] נטעים וגו' (דה"א ד כג), [שהם] שותפין עם האלהים בכל בריה, שנאמר עם המלך במלאכתו ישבו שם (שם), עם מלך מלכי המלכים הקב"ה במלאכו הם יושבים ובוראים ברי', אמר הקב"ה לא דיין שאין אני עושה דבר חוץ מדעתם, אלא כל מה שאני פועל בעולם הזה ובעולם הבא להם הוא מתוקן, הוא שדוד אומר מה רב טובך אשר צפנת ליראיך וגו' (תהלים לא כ).