NOTE 1: this thread is in D&D general because I think D&D does religion a little differently than other fantasy games due to the traditional inclusion of classes like the cleric and paladin. That said, feel free to discuss other fantasy games if they are appropriate.
NOTE 2: This thread is about fantasy religions and how the gods and their servants interact with playing D&D. It isn't about religion in general. You can use real world religions (ancient or current) as examples in discussion, but let's not make it about real world religions, please and thank you.
With that out of the way:
I was listening to a Great Courses on life in the ancient world and in talking about Mesopotamia and especially ancient Egypt, it got me thinking about how religions works in our campaigns. D&D religion is a weird chimera of myth and history, with mostly bad takes on both (at least as it relates to real world religion). That said, I find the place of religion in a D&D campaign to be fascinating and think there is some room for a discussion on how we, as individual worldbuilders and GMs especially, portray that element.
Dragonlance was a strong early influence on my view of how religion fits into a D&D campaign. I have leaned on the trope if the return of the lost, forgotten and/or old gods a bunch of times. Not being a religious person myself, I don't really model these forgotten faiths on anything particularly real, but rather use the trope as a way of talking about cycles of civilization and apocalyptic ends to them.
I also rather like the portrayal of religion in Eberron, where there are multiple religions that take very different forms, from pure philosophy to monotheism to traditional D&D pantheons.
One thing I have only toyed with in short games or one shots is the idea of legitimately living gods walking the earth, ruling their cities or otherwise directly lording over mortals. Like, if the city gods of Mesopotamia were active and not just bound to their statues. Being a cleric would be a different thing if your god summoned you before her to answer for your behavior on last week's dungeon delve.
How does religion fit into your D&D campaigns? What models of religions and faiths do you prefer? Are their settings that do religion really well for you? Do you make it an important part of worldbuilding or even play?