If you could go back and ask, say, Samuel or David or Saul about how many gods existed and what their names were, I suspect all of them would have been clear that YHWH was the chief of the gods, and the only one that Israelites should worship, but beyond that you would have gotten some complicated and perhaps confused answers. Even some parts of the Bible take for granted that other gods besides YHWH exist - see, for instance, Psalm 82.
https://www.biblegateway.com/passage/?search=Psalm%2082&vers...
Over time, "Baal" began to denote a specific agricultural deity, and it became less appropriate to use as a title for YHWH. That seems to have kicked off (or was kicked off by) the well-known conflict between Yahwism and Baal worship - see, ad infra, 1 Kings 18.
https://www.biblegateway.com/passage/?search=1%20kings%2018&...