Lyxen
Great Old One
I don't do this as a means to make D&D simulationist, but I often do have a semi-cohesive structure to magic and science in my worlds. Look too close and it, of course, breaks down, but I'm only making sufficient explanations such that someone researching magic isn't as nonsensical as someone predicting whether a fair coin will read heads-or-tails.
There's many ways I've fit magical models into my games. From them being an extension of divine beings, with Arcane magic being their power converted into a more generalized form. To magic being within a different spacial dimension that gets projected onto our third dimension through oscillation.
I obviously don't write entire proofs or theses of the magical energies of every given universe, but knowing how magic works to a certain degree does help me with consistency.
That is quite different from trying to define the physics of the world based on real-world physics and incorporating magic. Yes, there are power sources, and how they relate together is important, in particular often in terms of story. Or to adjudicate what gods are, how they can (or cannot) be affected by mortal magic, how psionics (if you use them) relate to the rest, etc.
Of course, we also have these kind of elements, mostly from the history of our games. But they are mostly important at high levels, and players in these adventures have all the necessary time to understand how this works, usually as part of experimenting in game.