כי כל אלה-י העמים אלילים וה' שמים עשה (בהודו לה')
The word וה' (and HaShem made the Heavens) does not seem to be consistent in the understanding of the verse. In place of “and” the verse would better be understood as “but HaShem made the Heavens.”
However, we do sometimes find that the conjunctive letter "ו" sometimes means “but” (in the sense of a contrast to the prior statement).
For example, the verse from MiKetz עבדיך באו לשבר אוכל" ו"לא אדוני . The brothers countered to the viceroy (Yosef) who charged them with being spies, “we are not my lord, but we are your servants that came to buy food.”
Another example is found in Parshas Shemini, הוא גרה לא יגר" ו"ואת החזיר כי מפריס פרסה הוא . This verse is indicating that the pig has one sign of kashrus (split hooves), but it lacks the other sign of chewing its cud. Other examples can be shown.
According to this understanding, then the “vav” in the above prayer can be understood. The verse says that the gods of the nations are nothing, but (not as “and” rather as in contrast) Hashem made the Heavens.
And with this understanding one can understand another difficulty. "וה' המטיר על סדום" (בראשית יט, כד) Rashi says that "'וה" means HaShem and His Bais Din. However, this general meaning can not be applied to the above prayer, since the angels were not created until day two whereas the Heavens were created on day one. Thus, Rashi means "וה'" generally means HaShem and His Bais Din, but only where possible.
