This is a difficult question as religion is older than writing, indeed older than civilization itself. So the earliest recordings of the worship of deities in Mesopotamia and the Indus valley almost certainly follow the first actual worship by a few millennia.