To the ancient world, the sun, moon, and stars were seen as living creatures, not just balls of gas or rocks in space. That is why pagan cultures worshipped them, but to the Israelites, they were just members of the host of heaven who served God. Who are the Hosts of Heaven? According to the Bible, there are Angels, Cherubs, Seraphs, and Sons of God in the Heavens. There are various beings in heaven, and they differ in appearance and roles. To the Bible believers, the spiritual beings in heaven are not gods, but servants of the Most High God. However, to the pagan nations, they were seen as part of a pantheon of gods. That’s how other ancient tribes ended up worshipping them as deities and praying to them, which the Bible frowns upon, even in the New Covenant (Colossians 2:18, Hebrews 1:14).
Elohim:
Elohim (אלוהים) is the plural version of Eloah (אלוה), which means god in the generic sense. In scriptures that say “you shall have no other ‘gods’ before me”, the word “gods” is translated from the Hebrew Elohim. For example, Deut 10:17 says For Adonai (the Lord) your God is God of gods and Lord of lords. ‘God of gods’ is translated from Elohim of Elohim. However, Elohim has another linguistic function that allows it to function as a singular. Usually, “im” at the end of a word in Hebrew makes the word plural, like “s” at the end of a word in English. However, some words can function as concretized abstract plurals. Meaning they take the plural form but are functionally singular. The Hebrew word for water, “Mayim” (מַיִם) functions the same way. Mayim has “im” on the end, but it often refers to a singular body of water. Concretization can be both singular and plural. In English, we have concretized singular words like “sheep”. When there are multiple of them, we still use the word “sheep” instead of “sheeps” because of this system.