And to what extent did people begin to identify more clearly with written history in the West as opposed to the stories told by those around them? I realize this is probably a really broad question that is difficult to answer, but seeing this week's theme brought up an old question/epiphany that I had where it seemed that legend, collective memory, and myth all probably contributed to a people's understanding of themselves and their world. That has largely been replaced by history, which is a lot more rigorous. I suppose you could point to the father of history, Herodotus, but clearly the European west continued to rely heavily on myth making and legend to tell their "own story" so to speak. Was there a specific event, book, person, happening that helped to push our understanding of history from a legendary perspective to a more academic one?
edit: to add a little on, and keeping within an understanding of no questions about events within the last 20 years... In a historian's opinion, how important is legend and collective memory to the development of, say, America's identity in the modern era? I'd say a great deal of modern US historical understanding is based on a legendary memory of our early history, for example.
I would not characterize "collective memory" and "history" as two mutually exclusive things. They are things that both help shape a culture's worldview, and both interact with the past, but they are two different ways of processing a culture's past that tend to work at cross-purposes - mnemonic narratives tend to be fairly simple and glorifying, while history is all about contingencies and the messy unpleasant spots of the past. I won't go into it in detail for the sake of the rules, but the ongoing strife over statues in the United States (and globally) is a really good example. Collective Memory and History (strictly defined) are both ongoing processes that have huge ramifications in political and social movements, and professional historians often have to unteach "myths" founded in national or popular collective memory.
Still, it seems like you are largely asking about the decay of so-called "folk culture," or a communal culture defined by collective memory, embodied in traditional festivals, garb, stories (especially stories situated in the local landscape), etc. This is described by Pierre Nora as "milieux de memoire" (environments of memory) as opposed to "lieux de memoire" (places of memory). Places of memory are specific sites, like a statue or a building, that collect a group's identity within itself, and claim "this is who we are and who we think is important". In this case, Nora, Bloch, and others kind of pinpoint it to somewhere in the later 19th or early 20th century in France! This makes sense - nationalization, industrialization, and rapid urbanization disrupt ties of the people to their physical land, and replaces it with an attachment to an abstract, unitary entity. This entity has to be manifested in national Things - places that define the imagined shared history and culture. It also manifests in a national curriculum, determining a History that is Taught, instead of an organically-emergent memory of a community telling stories and preserving local artifacts.
You can see this also in a shift in academic writing. To use my own field as a good example - prior to the later 19th century, there was widespread belief in the veracity of sagas as historical texts - the characters in certain "good" sagas were real people who did the things they were said to. But, in the late 1800s, a debate arose which was identified by Andreas Heusler and termed the "book-prose/free-prose" debate. Book-prose claims that the sagas are largely literary constructs, composed by an identifiable author, while free-prose claims they were the product of oral traditions that relatively faithfully preserve pre-Christian history. The Icelandic School of literary thought in the 1940s and 1950s were staunch Book-prose advocates, and their more "scientific", structuralist approach to analysis demonstrated a lot of the ways that sagas were fictional imaginings about the ancestors of medieval Icelanders! The truth is, though, somewhere in the middle, as memory studies has become really prominent in Norse studies and we are able to better interrogate how saga texts do and do not reflect genuinely early narratives and social ideas.
(That isn't to say that academia pre-1870 was all credulous nonsense - the field of history had highly competent ways of analyzing sources, and there is plenty of scholarship there that modern analyses confirm to be really insightful readings of texts. There's a joke in my field that anything you can think of was done by a German scholar in the 1800s.)
So, to sum up - collective memory is still a very real force today, and something that good history often ends up having to fight against, but folk cultures defined primarily by a culture of local collective memory disappear in most places in the 19th and 20th centuries.
P.S. the Internet may be creating new folk cultures similar to the type I described, but it can be hard to study given how quickly things age online. It's already kind of archaic, but Folk Cultures in the Digital Age, edited by Trevor Blank, may be a useful starting point to see how digital communities can parallel earlier folk cultures.