Elohim means pantheon of gods or host of gods. Elohim is being mentioned 2602 times in the Old Testament.
More than 4000 years ago, Genesis myth was partly plagiarized from the Sumerian, Babylonian and Akkadian creation myths. In those myths, there were pantheon of gods.
The Canaanites (ancient Jews) worshipped El Elyon (in Genesis, it was mentioned that they built El-Bethel, meaning house of god). When Moses and his clans left Egypt, Moses prayed to El Shaddai (god of mountain). Subsequently, the Israelites worshipped Elohim. From archeology, tablets were found for the early Canaanites worshipping both Yahweh and *Asherah (wife of Yahweh, or Queen of Heaven). Baal was worshipped, too, as fertility god.
*Jeremiah 7:18:"The children gather wood, the fathers light the fire, and the women knead the dough and make cakes of bread for Asherah (Queen of Heaven). They pour out drink offerings to other gods to provoke me to anger."
From 750 BCE, there were calls by some prophets to worship only Yahweh. After the fall of Israel to the Assyrians, there were more urgency in calling the early Hebrews to worship Yahweh only. The Deuteronomists began to warned that god is a jealous god, and would help the Babylonians to subdue the Israelites, if the Israelites did not repent and worship the "one true god". Subsequently, both Elohim and Yahweh morphed into a single god, Yahweh.