The Old Testament has quite a few references to snakes, serpents, and seemingly dragon-like creatures.
It’s possible these were used as metaphors for other civilisations. Or perhaps they were genuinely fearful of such creatures and wanted their own god to protect them.
It’s one of my hobbies to invent threads that tie all these ancient stories together into an overarching narrative.