I actually did a long dive into the notion of canon in entertainment media with friends today, scouring our memories and the internet -- and came to the same conclusions:Marvel. Star Wars. The early to mid 80s as a starting point.
The only earlier notion of canon involving "nailing down a fictional setting/characters into some sort of consitant reality" we found was "The Sherlockian Game" in the first half of the 20th century. In The Game authors and fans of Doyle's Holmes stories would write mock essays and scholarly works in the style of studies of the Bible used to poke holes in the Bible for inconsistencies, or find rationalizations for such "errors" to support the Bible as a sound truth. The whole thing was a lark mostly having a grand time by taking too seriously something that should not be taken too seriously.
By contrast, we might look at the Cthulhu Mythos... created by Lovecraft. But Robert E. Howard and Clark Ashton Smith (among others) borrowed freely from it for their weird fantasy stories, adding new details, and Lovecraft drew on their work. No one bothered to created some sort of unified reality or cross-reference all the creative shenanigans. It was a big bag of ideas that people drew from and put donations into. Arguments about what was "canon" or really Mythos or not would come decades later.
I really do think some thing happened in the early 80s, a confluence of something new -- RPG settings, convoluted Marvel plotting, and the juggernaut of the Star Wars IP in which a setting was proven to be valuable in cash flow in a way no other setting had ever been.
I haven't been able to sort out a lot of the whys and hows, or the motivations of a certain segment of genre fandom that fed this desire for "canon" so fiercely. But as far as the timeline and original sources, I think nobby-w pretty much nailed it.