Sumer, in the far south of Mesopotamia, is the earliest civilisation whose religion can actually be read, and its basic institution is the temple household.
Each city belonged to a god: Nippur to Enlil, Uruk to Inanna and An, Eridu to Enki, Ur to Nanna the moon. The temple was not a place people visited to pray so much as an estate, with fields, herds, workshops, storerooms and a large staff, all held to be the property of the deity and administered on his or her behalf. The god was housed in a statue, fed twice daily, clothed, and taken out in procession. Writing itself appears to have developed out of the accounting this required, which makes the world's first documents temple receipts.
Sumerian scribes then used that writing for religious literature, and the corpus is substantial: hymns to the temples of every major city, laments over cities destroyed, myths of Enki and of Inanna, and a narrative of Inanna's descent to the underworld in which she passes seven gates, surrenders an item of clothing or regalia at each, and is killed. The temple hymns are attributed to Enheduanna, a daughter of Sargon installed as high priestess at Ur, which if the attribution holds makes her the earliest author in the world known by name.
A flood story, a king list of implausibly long reigns before the flood, and a paradise account also belong to this literature.