The question really is, is the power of magic static? Dnd5e has reference to "things that could be crafted but no longer can". Is that because no one knows how or because the level of magic or nature of magic is different or the magic users themselves are different.
Earthdawn posits a magic cycle, where at its most powerful demons can walk the earth at will and at the lowest magic effectively doesn't exist.
Or perhaps magic is the same and the casters are different. Other games imply the blood of gods once ran strong in some people and now it has thinned due to either generations or interbreeding.
Perhaps those primal individuals could control magic much as the Fey but now those traits are gone.
I've always imagined the base of governing dynamics of magic to be fixed but that extents of knowledge of how to access, direct, or channel that magic that may vary over time. Perhaps something like pools of magical potential might vary in power over time or in how accessible they are, for instance when planes become closer or more distant.
I don't use a single persistent world from campaign to campaign. Heck, I don't typically even run the same ruleset from one campaign to another. So, any history/evolution of magic is only local to one campaign.
I don't generally specify details of metaphysics or cosmology unless/until I intend them to be plot-relevant, things that the PCs are expected to directly muck with.
So, for example, if I am running an epic game in which the BBEG aims to return the world to some Golden Age (that will, of course, suck for the PCs, because this is a BBEG), then I'd think about how magic changed, and be prepared for the PCs to toy with the Old Magics, so they can make a choice on whether they will oppose the BBEG.
But, if the main opponents are mundane politics, I'm not going to bother working out the history of magic. I'll work out the history of those politics, instead.
Haven't run my homebrew world (Witching Grounds) in a looong time, but there were a couple things about how magic changed that were interesting:
1. How prevalent magic is ebbed and flowed with dragon activity. When dragons went into hibernation, becoming parts of the landscape for a couple centuries, there was less magic and it was more localized. Now that dragons have been returning, there are more people being born with the gift for magic.
2. Society's response to magic has worsened after sinister magic was worked by the Witch Queens & the Mages of Suleistarn & a recently deposed heir apparent who tried to use magic to "steal" several noble bloodlines.
3. The original magic of the world was True Names taught by angels & dragons, but that was long since codified, hoarded, and sometimes lost or deliberately wiped out. So old magics tend to use True Names, while newer magic relies on a more diverse set of arcane traditions.
Back in 2003 @RangerWickett hosted the Fantasy Arms Race experiment that was posited on two primitive humanoid tribes getting in to conflict and engaging in centuries of ongoing battle and development of technology and magic. Magic starts with Shaman seeking divine boons from the spirits, it was an interesting exercise
elementals, spirits and planes imply that Magic is fundamental to the universe* so as worlds formed and creatures appeared/evolved/were created Magic was present. Some creatures are inherently magical, others become infused by latent magic, while others need to learn it.
Maybe even the earliest Eukaryote bacterium were using abjuration energy for protection, lifeforms like Oozes (macro-ameoboids) and elemental infused animals give a template and an incentive for the study and mastery of magic by intelligent creatures (including humanoids)
*in a Superhero games where I played a Magic Physicist I posited that Magic is a fifth fundamental force responsible for maintaining stability between dimensions (M-Field). Early lifeforms like fey and gods learnt to manipulate the Magic like electricity to ‘do magic’
I personally find the idea that (very specifically) D&D's magic system could have evolved...well, patently ridiculous. It is far too overwrought and laden with hermetic magic expectations to be an evolved system.
But that doesn't mean I don't think supernatural power can evolve.
As an example, one explanation I've come up with for the nature of dragons is that they could actually be an "invasive" species from a different reality. One that is far harsher than the mortal world. There, dragons almost never survive to "ancient" status. Many are lucky to survive long enough to lay their eggs. Even their innate strength and magic merely ekes out an existence in this dangerous native plane.
But then they came to the mortal plane. A place where, by comparison, almost nothing is as scary as a dragon. Where they live longer (perhaps a secondary effect, e.g. there is just "more magic" here and this affects their lifecycle.) Death to ordinary predation is rare, and only a few individuals make it from Dragonworld to the mortal plane, so population numbers remain low but stable. The exceptionally long-lived and intelligent dragons can thus live lives of opulent luxury, and even should their numbers fall due to mismanagement or hunting, new blood acquired from Dragonworld ensures the species survives.
That's the kind of "evolved magic" I look for. Not spell slots or daily spells or even "spells" in the usual sense. Magic in D&D is too chained to the spellcasting mechanic, and that mechanic just doesn't make sense as something a non-sapient animal would evolve over geologic time scales.
Edit: As for how magic works or came into existence in Jewel of the Desert...that all depends on what kind of magic is in question. Divine magic doesn't really "evolve," but people can learn to use it better, in part by following the lives and doctrines of "saints," prominent individuals of the faith. Primal magic is mostly known from the spirits themselves, so it's...not exactly "evolved," more a negotiation between wildness and methodical effort. Wizard magic is academic, and thus grows by careful experimentation and imitation of other types of magic. Bard magic is unstructured and spontaneous, like jazz. Genies and dragons and devils and other types of beings have innate magic which...just is, it has little in the way of formal rules, but sometimes people can master more discrete/formalized magic powered by that raw elemental magic.
Waziri (Wizard) magic has probably evolved the most, but it's also the most difficult to work with. Poorly-made spells can cause horrific damage. Hence, even the most wild Waziri tend to be very methodical. It gives them a love/hate relationship with other types of magic. They long to learn how to do new things. But they also (often) look down their noses at non-Waziri magic as unthinking or primitive. There's also some pride in it being purely the product of mortal minds, rather than a spiritual gift or innate power.
I sometimes run games with the premise that magic requires power sources, and high level magic requires you to bond to a mighty source of power.
With priests, you need to be sufficiently ordained in your religion for you to be permitted to tap into the collective prayers of the faithful. It's not the god that grants the power; the god is just the focus of everyone's devotion, and that devotion is the actual source of the power.
With wizards and such, they've got to do the Magic: the Gathering style thing of traveling to different places of power and completing an adventure to link to its mana.
In this framework, magical spells of the highest level are always possible, since once you have access to the power, it can do all sorts of stuff based on how creative you are (as long as the outcome matches the theme of the magical power source). But what changes over time is how organized are the systems of helping people learn how to get the power.
In the Stone Age, one dude managed to kill a dragon and toss it into a volcano, and he became a mighty fire wizard. In the Bronze Age, a cabal of fire wizards pass down the secrets of various monsters that are good to kill and offer to the volcano in order to enhance their power. By the Iron Age, the wizards have learned how to share that power among all their members, but they guard it jealously, and they've managed to steal some secrets from other wizard orders about how they got their powers, so now they can do more than just fire, but also necromancy!
And then if we got to the Renaissance, academies would open up teaching people the basics of wizardry, and for the sake of protecting their nations kings would empower the wizard cabals to train war mages, and the peasants would be required to raise cattle to be used as food for the great beasts that must be sacrificed to various fiery pits - volcanoes sure, but also man-made furnaces. And the middle class would make a living crafting high quality arrays of magical foci that the royal wizards would use to focus their power.
And then in the Industrial Age, the principles of fire magic would lead to the development of arcane engines that harness mundane fuel like coal and turn it into a mighty battery for spellcasting. But you'd still need the training to harness it, so even if a 1st level wizard had the control wand necessary to access the power of an arcanotechnological furnace, he'd need practice to pull off more than a burning hands.
I don't normally think of it when creating a world, but taking some time regarding magic in music world, some of it probably evolved like the following.
Divine magic didn't exist until the gods arrived and sorted the world at the end of the mythic age, before then the 2 main sources of magic were arcane and primal magic.
During the Mythic Age, the Titans and Primordials taught primal magic to their followers who formed mystic communities around the 4 prime elements made of members of the shaman class (based on the WoW shaman). Giants especially, but also many members of former elemental domains still practice this form of magic.
The Elder Dragons imbued their draconic followers with sorcery, forming the basis for arcane magic in the world.
With the arrival of the gods, divine magic entered the world. Primal magic in the form of druidism came with it, being the primary spellcasters of the Wyld Faith amongst the elves and various tribes of humans. With the coming of the gods also came the Mage, The god of magic. Arcane magic had spread amongst the elven followers of of the Mage and many sorcerers at the end of the Mythic Age began to codify their magic helping to proliferate wizardry throughout the world. Sorcery and wizardry still require the ability to tap into arcane forces, you can't just study magic at a wizard academy and cast spells, you need "the gift", but it does provide a different means for those so gifted to learn arcane magic.