To clarify: A lot of ancient European and Mediterranean religions are taught like they had a consistent pantheon, in terms of the gods involved, their relations with one another, and their history. Zeus is the god of thunder, slayer of Kronos, brother-husband of Hera, and father of Heracles. Frigg is the wife of Odin and mother of Baldur. Horus is the falcon-headed son of Osiris and Isis, and the slayer of Set.
However, I know that in the case of many Near Eastern religions, there was never really a unified mythology, and was instead a loose collection of city cults with varying degrees of syncretism with one another. Was this ever the case too with European religions? Were there swathes of ancient Greece who had no clue who the hell the Titans were, or that Zeus and Ares were related? Did the priests of Set have a narrative for their god sans duel with Horus?
If that is the case, then when did the modern codifications develop? Was it done by outside historians compiling all the myths? One state imposing its rule (and subsequently their own interpretation of religion) upon the rest of the people? Modern historians trying to codify a confusing subject?
Hi, currently writing a master’s thesis on comparative ancient Greek and Near Eastern religion (broadly speaking). You are correct in your suspicion that the ancient Greek religion consisted of many local cults with slightly different focuses, but they did all recognize a shared pantheon. So everyone in ancient Greece who followed the “Greek religion” would know the broad strokes of the shared mythology: that Hera and Zeus were queen and king of the pantheon, that Ares was their son, that Achilles killed Hector, etc.
However, different areas were more interested in specific deities and had their own local cult traditions. For example, Artemis had a very famous cult at Brauron (~24 miles from Athens), where she was worshipped with rituals and traditions specific to that cult site. Or to take an example that I am studying currently, Hera was recognized as queen of the gods, Zeus’s wife, all throughout Greece, but her importance varied from place to place. We tend to see her as the “goddess of marriage”, which is partly a construction by post-Renaissance scholars. Hera presided over marriage (and its associated experiences: pregnancy, childbirth, domestic labor), but various regions had their favored female goddesses for that same sphere while still recognizing Hera’s primacy as queen. So Hera was a powerful goddess, and worshipped in her own right, in the Argolid, Boeotia, Arcadia, and Samos (among other places), but in Attica (where Athens is located), she was reduced to “just” a marriage goddess, and her worship appears to have been restricted to a single, relatively minor festival. (Edit to clarify: I am speaking specifically about the late Archaic period and Classical period in Greece, from the 6th century BCE to 323 BCE, the death of Alexander the Great.)
The ancient authors are partly responsible for the perception that there was a single unified Greek religion. Much of what we know about ancient Greek religion is handed down to us from authors/texts like Hesiod or the Homeric Hymns, which condense multifaceted myths and divinities into streamlined narratives—the way that the Brothers Grimm took European fairytales and codified them into what we now know today. The myths we know from ancient Greece do reflect the broad understanding of the pantheon and mythology, but obscure significant local variation in practice.
Were there populations of ancient Greece that didn’t know about the Titans, or some other less central aspect of Greek mythology? I’ll admit I don’t know much about the Titans myself—amazing how much one can specialize themself into a box—but I can say this: there were plenty of rural, or just uneducated and illiterate people in ancient Greece whose experiences, beliefs, and stories go unrecorded. They may have been aware of and participated in major festivals, dedicated votives at temples, partaken in sacrifices, and told stories about their local heroes, without necessarily knowing the intricate ins-and-outs of what we modern people have been taught is Greek Mythology.
Edit: a couple typos
This is actually a very interesting question, and I had to do some digging back for it. My answer as well as my understanding is mostly from classical antiquity, but before this period I'm not sure enough primary evidence exists to concretely answer your question one way or another. While it obviously varies by place and time, "formal" codifications of religious belief and narrative did exist in European polytheistic sects, thought it was pulled from a cultural soup of disconnected religious cults and belief systems. Cults dedicated exclusively to one deity and cults dedicated to a pantheon or part of a pantheon all existed, and both interplayed and ignored each other's canon to a lesser or greater extent.
There is also the dichotomy of belief between cultural of groups regarding religion in this period, and that dichotomy is that of belief in other deities besides their own. In some societies, the prevailing narrative was "our gods are real, and all others either false or are our gods but with different names" (the latter being more common in my experience, though I could be wrong on this point), and in some, it was believed that "our gods are real, and so are yours." This does mean that in many cases, belief was highly decentralized, but usually rough narratives did form across common cultural groups. While obviously communication was not nearly what it is today and certain places likely did suffer canonical gaps, trade and travel still did occur often, particularly within groups with common linguistic ties. I've never seen evidence to suggest classical greek-speaking peoples on the southern Balkan peninsula or orbiting aisles had never heard of Zeus, for example, or canonical gaps that large, though that isn't to say they didn't occur. There's a growing group of revisionists (not negatively connotated, revision based in actual scholarship) that dissects the origins of classical deities and their cults.
However, formal cross-society codification still did occur, and to my mind came from 2 places, one intentional and one incidental. The first, intentional codification came from the leaders or influential people in classical societies intentionally either inventing or staking a claim to a particular religious narrative. An example would be the codification of Sol Invictus as one of Rome's premier deities and Rome's official Sun God by Aurelian (not Marcus Aurelius), a Roman Emperor who worked to re-stabilize the Empire during a period of crisis in the 3rd century AD. The origins of Sol Invictus are actually up for debate in a manner similar to previously stated, but regardless of if he was drawn from European or Eastern cults, he was not part of the common religious narrative of Rome until his intentional ascension to that place by an influential figure within the Empire. The other source is grassroots promotion over time, where belief in a certain canonical aspect is widely known. An example of this would again be the cult of Bacchus during the second century BC, whose proliferation is widely mysterious, for known and unknown reasons. The God was associated with wine, pleasure, and secret rituals and rites. Membership in the sects was often quite secretive, as was the goings on within the cult, but their existence was widely known and some primary sources even give us names of the priestesses and members, but this was far from a singular, central effort. Interestingly enough, this example of the second source is also an example of the first, as the cult was later outlawed and suppressed by the leadership of the Roman Republic at the time according to Livy. Hope this helps, and I also fully admit gaps in my knowledge, perhaps others could contribute other insights from other classic or ancient societies.
Edit: A word
To provide a different perspective from Norse religion - it was absolutely, totally disjointed, and the emerging consensus among the leaders of the field (e.g. Terry Gunnell and John Lindow) is that the entire idea of a Norse "pantheon" is at best misleading.
Our best understanding of pre-Christian Norse religion, led dominantly by onomastics (place-name studies), archaeological finds, and extremely critical reading of a small number of poems, suggests a hyper-local religious practice that only begin to cohere into the pantheon recognized in the Eddas at the end of the Viking Age and especially in the post-Christianization period.
The typical view of the gods is essentially that found in the Prose Edda (composed c. 1220), which provides a pretty nice and coherent view of the Aesir and the Vanir. It is itself largely derived from West-Norse material, dominantly dating from the late 900s or later (Voluspa, the first poem of the Poetic Edda and one that the Prose Edda quotes extensively, probably dates to c. 975). However, place-name analyses, such as those done by Stefan Brink, suggest a very different view. Only a few figures, chiefly Thor and Odin, but also Ullr, Freyr, and Njordr, appear to have been cross-regionally venerated - most others occupy fairly localized clusters of names (e.g. Tyr in Denmark) or are totally absent (i.e. Loki.)
Further complicating this are a lot of hints in the later sagas and earlier poems that all suggest that, beyond the major gods, there are a whole host of "lesser" figures that Armann Jakobsson suggests were lumped together under the term alfar (elves). Part of this comes from the epithets of relatively major figures like Freyr and Volundr as "lord of elves" - i.e. the top of a much larger group. Unfortunately, what exactly worship of these localized being looked like has been lost, but there are numerous rituals that exist in faint hints that suggest an other-world populated with lots of spirits influencing the material world.
The field is developing rapidly, of course, and we're learning a lot, but I think it's worth concluding with a note from John Lindow's 2017 chapter in Old Norse Mythology - Comparative Perspectives, discussing Balto-Finnic folklore as a point of comparison to Norse mythology: "If we had a corpus even 10% the size of the Finnish-Karelian, we would see variation so clearly it would presumably cease to be an issue". A lot of energy historically has been spent trying to make the stories, and the pantheon as a whole, "make sense". This is a view that there's no real reason to espouse with Old Norse material, and taking a highly decentralized view of variable local cults of only loosely-related practices seems to match the emerging body of evidence much better.