The belief system comprised of an unknowable entity that created a bunch of lesser entities known as 'Archons'. One lesser entity, Sophia, wanted to be like the unknowable one, and decided to 'create' a being known as the 'Demiurge'. The Demiurge created the Universe and the Earth, but, since he wasn't created by the OG, it was 'defective' and, instead, made a world full of stress and struggle. It then proceeded to make a human, but, since it was 'defective', all of it's creations were as well, including the human who the Demiurge treated as an absolute slave. Sophia the Archon took pity on the human and imbued it with 'divine energy'.
The rest is in the link.
I'm not writing novels.