"Baal" was less a name than a title. In modern Hebrew, it just means "lord" or "husband". It was also apparently a title that could, at some stages of Israel's history, even be applied to YHWH, much like "Adonay" ("My lord"). For instance, the individuals named "Mephibosheth" and "Ish-bosheth" (two of the sons of Saul, a clear if imperfect Yahwist) were originally named "Meribaal" and "Ish-baal". Whoever put together 1 and 2 Samuel changed their names from "May Baal Contend" and "Man of Baal" to various plays on "shame" (bosheth). Their original names are preserved, oddly enough, in 1 Chronicles.
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&...