This is what the hierarchy of spirits looked like, from my understanding:
Yahweh- Supreme Elohim
Host of Heaven - God’s divine council, perhaps the stars in the sky were perceived of as being members of the Host of Heaven, given as the term is used interchangeably (see Isaiah 34:4).
Seraphim and Cherubim - divine throne guardians of Yahweh. The former were winged serpents, the latter Chimeras of multiple creatures.
Angels - Messengers of God, nothing more or less, given as the Hebrew word ‘Malak’ literally means messenger. The sons of God in Genesis 6 were most likely Angels, according to Jude 7.
Shedim- Lesser spirits, possibly demonic, but not necessarily always, given as an Akkadian cognate word ‘Shedu’ means a guardian spirit. I would suggest something akin to Islamic Jinn.
Rephaim- human ghosts, perhaps the most famous being that of Samuel, summoned up from the grave/underworld.