וּפֶן־תִּשָּׂ֨א עֵינֶ֜יךָ הַשָּׁמַ֗יְמָה וְֽ֠רָאִיתָ אֶת־הַשֶּׁ֨מֶשׁ וְאֶת־הַיָּרֵ֜חַ וְאֶת־הַכּֽוֹכָבִ֗ים כֹּ֚ל צְבָ֣א הַשָּׁמַ֔יִם וְנִדַּחְתָּ֛ וְהִשְׁתַּחֲוִ֥יתָ לָהֶ֖ם וַעֲבַדְתָּ֑ם אֲשֶׁ֨ר חָלַ֜ק יְהוָ֤ה אֱלֹהֶ֙יךָ֙ אֹתָ֔ם לְכֹל֙ הָֽעַמִּ֔ים תַּ֖חַת כָּל־הַשָּׁמָֽיִם׃
и чтобы ты не поднял глаза твои к небу, и когда ты увидишь солнце, луну и звезды, даже все воинство небесное, ты будешь отстранен и поклоняться им и служить им, что Господь, Бог твой, наделил все народы под всем небом.
Tze'enah Ure'enah
“These, the Lord your God allotted to other peoples” [4:19]. The Torah tells us that you should not follow the foreign gods that the nations worship. When things go well for the gentiles, it is because the Holy One allows it to happen so that because things go well for them, they will be destroyed along with their foreign gods. Rabah the son of Isaac said to Rabbi Judah. There is a foreign god that when people desire rain, something appears to them and says to them: slaughter a person and then I will allow the rain to fall. As soon as they slaughter a person, the rain falls. Rabbi Judah responded: If I had been dead, you would not have understood this. However, now I will tell you how this happens. I heard Rav say that the Holy One misleads the nations of the world that they should think that it is something good for the foreign god and they should be destroyed. God leads the person the way that he wants to go.12Bahya, Deuteronomy, 4:19.
Rashi
ופן תשא עיניך AND LEST THOU LIFT UP THINE EYES to ponder on the matter, and to set your heart to go astray after them.
Chizkuni
לכל העמים, “unto all the peoples;” the luminaries shine for all of mankind, regardless of their religious orientation. They shine equally for the dumb and the intelligent, the righteous or the evil doers. Anyone who worships such phenomena which do not distinguish between different categories of creatures, must surely consider himself as having been greatly humiliated by such “gods.”A different interpretation about the words: לכל.....אשר חלק העמים, “which He has assigned to all the nations.” According to this approach, the phenomena in the sky are indeed intended to exert a degree of awe for all the other nations, barring the Jewish people. You, the Jewish people whom G-d has chosen as His inheritance on earth, it behooves not to bow down to any power but to Him. They need not be in awe of any other phenomena in nature.