The wiki article does a decent job. Basically the mentions of him in the texts describe different beings because they were written by different authors for different audiences with much different views. The serpent story has echos of other bronze age ones in that area and the text says as much that El put him there. The story in Job looks like a Cannite legend that got reimagined in Judaism. At some point the people of the region believed in desert spirits that would inhabit people causing them to go crazy and kill other people.
Due to the first exile Judaism started inventing an explanation for why they weren’t allowed to freely practice by imagining a being that was opposed to El. Because the pattern had broken. The pattern of the past was: everything fine, Jews sin, god punishs, jess repent, everything fine. However, this time they were trying to repent and weren’t able to. Which meant that something was blocking it. Hence Satan. The accuser.
By the time Paul came around the Book of Enoch was popular and to him Satan was a leader of a celestial army of angels. Which is why Paul said that had they known they were killing the son of God they still would have. That were not just following El. Off his writings we see things like Revelations and John where Greco-Roman celestial powers were merged with Satan and Lucifer together.
There was never an idea that someone had 2900 years ago and Christianity is following it. Like all myths it is a combination of different fables, attempts by people to explain their world, and thinkers continuing on a tradition.