Hume's beliefs address not animism (so far as I know), but the other two. Hume claims that the same fundamental 'irrational' and 'psychological' forces are the root cause of both polytheism and theism (i.e. monotheism).
While polytheism is concerned with the concrete events of life itself within the immanent sphere – monotheism is concerned with some 'abstract and speculative' understanding of not the mundane events of reality, but of some totality of the universe.
He explains that theism arose from polytheism when one particular god (among the many gods) is the favorite. Humans, over generations, imagine this deity as being more and more powerful than the others. This process continues until that one divinity is considered to be "infinite and entirely perfect".
N.B. quotations are not from Hume's work, but from below reference.
Russell & Kraal. SEP entry, "Hume on Religion" https://plato.stanford.edu/entries/hume-religion/