The general history to the word “pagan” goes back to the Roman era but has a funny twist.
It was a word or slang that you’d use for civilian-turned-soldier who was considered incompetent, and had nothing to do with religion. At some point, the use of the word shifted around and was used for non-Christians who saw Christians being considered soldiers of God and incompetent. At some point, the Christians turned around and used the same slang word for non-Christians (incompetent). If you weren’t a Christian then you had to be a pagan worshiping the wrong God.
I thought “pagan” originally was a Latin “slang” word for rural person. Basically the equivalent of “hillbilly”.