Devarim8:18

וְזָכַרְתָּ אֶת־יְהוָה אֱלֹהֶיךָ כִּי הוּא הַנֹּתֵן לְךָ כֹּחַ לַעֲשׂוֹת חָיִל לְמַעַן הָקִים אֶת־בְּרִיתוֹ אֲשֶׁר־נִשְׁבַּע לַאֲבֹתֶיךָ כַּיּוֹם הַזֶּה׃

But you shall remember the Eternal your Almighty, for it is He who gives you power to get wealth, that He may establish His covenant which He swore to your fathers, as it is this day.

Devarim 8:18

וְזָכַרְתָּ אֶת־יְהוָה אֱלֹהֶיךָ

Devarim / Deuteronomy 8:18 · Drash

Devarim 8:18

וְזָכַרְתָּ אֶת־יְהוָה אֱלֹהֶיךָ כִּי הוּא הַנֹּתֵן לְךָ כֹּחַ לַעֲשׂוֹת חָיִל לְמַעַן הָקִים אֶת־בְּרִיתוֹ אֲשֶׁר־נִשְׁבַּע לַאֲבֹתֶיךָ כַּיּוֹם הַזֶּה׃

But you shall remember the Eternal your Almighty, for it is He who gives you power to get wealth, that He may establish His covenant which He swore to your fathers, as it is this day.

Drash דְּרָשׁ

Above the stars

People have long said: "that is how the stars lined up", "lucky", "unlucky". The midrash tells how the Eternal lifted Avraham (Abraham) above the stars.

Rabbeinu Bahya: the Eternal gave into the hand of Israel the power of the constellations to gain wealth below, and the constellations have no rule over him. As the sages said: "There is no mazal for Israel." So the Eternal promised Avraham: He took him outside, told him to look at the sky from above downward, and said: "So shall your descendants be", that is, above the stars.

How Rabbeinu Bahya explain it

Rabbeinu Bahya And you shall remember the Eternal

That from Him alone all good comes to you, "for it is He who gives you power to get wealth". That is, He gave into your hand the power of the constellations that He created, to gain wealth below, and He set you to rule over them, and the constellations have neither rule nor dominion over you. As our sages of blessed memory said: "There is no mazal (מַזָּל) for Israel."

This is what is said: "that He may establish His covenant which He swore to your fathers", for so He promised Avraham (Abraham): all his descendants would be above the constellations. And so our sages of blessed memory expounded: "And He brought him outside and said: look now toward the heavens" (Bereshit / Genesis 15:5). "Look" is said only of looking from above downward. This teaches that He lifted him above the constellations and said to him: "So shall your descendants be."

Takeaway

"There is no mazal for Israel" is a saying of Rabbi Yochanan in the Talmud (Shabbat 156a): the stars do not decide the fate of Israel.
The midrash that the Eternal lifted Avraham above the firmament and therefore said "look", that is, from above downward, is in Bereshit Rabbah 44:12.
Onkelos translates our verse: "He gives you counsel how to acquire property". Rabbeinu Bahya sees in "power" rule over the constellations.