Let’s use the proper term for this, henotheism. Polytheists acknowledge many gods and worship many gods; henotheists acknowledge many gods but worship only one. In this view, different gods ruled different territories just as kings did, and tribes owed allegiance to whichever god protected them.
I’ve gotten a lot of insight into Old Testament henotheism from Thom Stark’s The Human Faces of God. Some of what follows comes from chapter 4 of that book.
The Song of Moses (Deut. 32) is considered to be some of the oldest material in the Bible—dating to the mid-13th c. BCE. We have several somewhat-inconsistent copies, the oldest being from the Dead Sea Scrolls:
When Elyon divided the nations, when he separated the sons of Adam,
he established the borders of the ...view middle of the document...
The passage concludes with Yahweh getting Israel as his inheritance.
We learn more about terms like “sons of the gods” by widening our focus to consider Ugaritic (Canaanite) texts. Ugarit was a Canaanite city destroyed along with much of the Ancient Near East during the Bronze Age Collapse in roughly 1200 BCE, a period of widespread chaos from which Israelite civilization seems to have grown.
The Ugaritic texts state that El and his consort Asherah had 70 sons, which may be the origin of the 70 nations (or 72) that came from Noah’s descendants listed in Genesis 10.
The Old Testament is full of clues to the existence of multiple gods. Genesis is a good place to start.
Then [Elohim] said, “Let us make mankind in our image, in our likeness” (Genesis 1:26).
We also see plural gods when Jehovah warns them that man mustn’t eat the tree of life (Gen. 3:22) and that they must confuse mankind’s languages lest their projects, like the Tower of Babel, succeed (Gen. 11:7).
A common Christian spin is either to say that the “us” is the Trinity or that it is a heavenly assembly of angels. But can we imagine that the original audience for Genesis would understand the Trinity? And why imagine an angelic assembly when the polytheistic interpretation of Genesis simply growing out of preceding Canaanite culture is available and plausible?
Psalms is another old book that has fossilized the earliest forms of Judaism. We see the assembly of the gods mentioned several times.
[Elohim] stands in the assembly of El; in the midst of the gods he renders judgment (Ps. 82:1).
For who in the skies can compare to [Jehovah]? Who is like [Jehovah] among the [sons of God], a God who is honored [in the great assembly of the holy ones], and more awesome than all who surround him? (Ps. 89:6–7)