The devil isn't the church, but the modern church created the devil. In the Bible the Hebrew word translates to adversary. When talking about nations and kings, it's translated as adversary or enemy. But in places like Job, it's translated as Satan or The Devil. Even in Greek, the word diablos literally means 'something thrown across a person's path' .. a challenge or trial of sorts. It wasn't seen by most as a god or demon or manifestation. "Get behind me Satan" when Jesus is talking to Peter is such a weird translation, because it's more appropriate that Jesus is saying "Get behind me stumbling block/enemy"
Even the "origin story" of Lucifer, a falling angel from heaven, only appears two places: Isaiah and Ezekiel (and the Isaiah one sounds like it's talking about an evil king; but people interpret the "morning star" as Lucifer because the verse says "you were there in the beginning" ... but then goes on to talk about a current king :blobcatwhat:) The story of Job predates the Torah and likely originated around the same time as Gilgamesh (English translations also leave out Lilith from Isaiah, which also comes from Gilgamesh).
I've found a lot of conflicting stuff on where the modern idea of "the devil" started to be a thing in Christianity. I think it was pretty well in place by 200 AD, but it certainly was an invention of the modern church and didn't seem to exist in Judaism or proto-Yahwism