I've read a lot of books about magic being rediscovered after some cataclysm wiped it out, or the practitioners died/left. E.g., Wheel of Time, Eragon, Sword of Truth, many from Brandon Sanderson, etc. And there are others where magic is well established, but the protagonist is new to it. E.g., Harry Potter, The Magicians, others from Brandon Sanderson, etc. I have not, however, read any books where magic is newly discovered.
My example has Wheel of Time "spoilers", so it's hidden (just in case):
Robert Jordan hinted that the world in the WoT story was just our world two ages from now. That means that between now and the Age of Legends there will be a time where anyone/everyone is just learning about The One Power for the first time and how to use it. (Though RJ never wrote such a book.)
What was the earliest example of a book or book series that tackles the first discovery and use of magic by an entire group or society?