My alt take on magic, and something I've been using since the 1980s: Magic spells come down to two elements: The formula and the power source. This idea has evolved and been revised through the editions, but the core idea has remained the same.
The formula is essenially the same whenever you cast a spell available to multiple classes. When you cast detect magic, it looks essentially the same whether you're a druid/ranger, cleric/paladin, wizard, sorcerer, bard or warlock.
The small differences come from how you interact with a power source that powers the spell..
The druid draws magic directly from the Positive and Negative energy plane. The power of life and death are at the core of a druid's powers. They are the most prial of spellcasters. This power flows to them through the weave of the universe and they let it flow into them and translate it into effect through patience, understanding and community. They become one with the magic to make it work.
A cleric is in a "give and take" relationship with a God. He offers up his prayers, and the prayers of those he inspires to worship, in exchange for powers that serve the Deity's agenda. The God grants the power to make spells work, and can pull that power away at any time should the cleric fail them. Clerics without a God are granted their power by Ao, the first God, a being so removed from the world of mortals that there are no myths, legends or tales that personify him in any way. When the cleric casts detect magic, they ask the God for the power to make it happen. They perform the motions and let their Deities put the magic into it.
Wizards draw magic from the universe. Magic flows through everything if you only know how to tap into it and draw upon that weave of magic. This is incredibly difficult to do, and requires either great intellect to figure out and extricate (wizard's intelligence), or great force of will to push into existence (sorcerer or bard). When a wizard casts detect magic, they attach themselves to the weave and pull upon the threads of magic around them to extract the power in the right direction, intensity, shape, and speed to power their spell. Sorcerers and bards use the brute strength of their personality to rip into the weave, draw magic from it, and reshape it to their needs. The wizard uses the scalpel of their spellcasting to perform delicate work. The sorcer and bard use a scoop and then recraft what they draw from the weave in a blunt way.
Warlocks also draw power from otherworldy powers, but there is no faith - there is a deal. That deal is negotiated, and can be lengthy and full of loopholes, or brief and vague. Regardless, the warlock is granted escalating levels of power in exchange for something the deity wants. It might be a soul, labor, or just information gathering - or something entirely different. When a warlock casts detect magic, they tell their otherworldly business partner to fulfill their debt, and expect the service done - as a contract is binding upon both parties.
Incidentally, the druid, cleric/paladin and warlock all have their power delivered to them through the same arcane weave that the arcane spell casters draw upon - they just get a delivery while the arcane spellcasters work to take from the weave.
Psionic PCs (including monks) generate thir own power. It does not come from the arcane weave, from Deities/powers, or from the Lifeforce - they learn to create power within and use it to make magic happen. This self reliance makes their powers immune to dispel magic, anti-magic zones, dead magic zones or other magics/effects that cut off access to the weave. Each psonic being's magic takes the form they develop, sometimes mimicing the spellcasters that draw upon the weave, while at other times being very foreign. The Far Realms and abominations from it use this type of magic.
Finally their is the original magic - the Natural and Supernatural magic (which I Iong ago collectively labeled Elemental magic, but that label causes way too much confusion). This is what powers ghosts, cursed lands, and the transformation of a cannibal into a Wendigo. It is the universe recognizing something out of balance and trying to rebalance it and perhaps failing. It is also a gunpowder explosion, electrical current running through metal, winter storms and windmills. It is the world itself creating and destroying energy through mundane interactions. Scholars understand how these things are magic, but like psionics, they do not draw upon the weave or follow the same rules as the divine, life or arcane spellcasters, so many do not understand or accept the magic in the universe around them as magic.