Deuteronomy 4:19 (ESV)

19 And beware lest you raise your eyes to heaven, and when you see the sun and the moon and the stars, all the host of heaven, you be drawn away and bow down to them and serve them, things that the LORD your God has allotted to all the peoples under the whole heaven.

Moses now warns against worshipping the heavenly hosts, the things in the cosmic sphere. Again, Israel was to avoid the temptation of worshipping creation rather than the Creator, which was the practice of their Near Eastern neighbours. The heavenly hosts have been given to all humanity to use for its benefit, not for its worship.