The Magician climbed the stairs. Midnight found him in his study, poring through leather-bound tomes and untidy portfolios … At one time a thousand or more runes, spells, incantations, curses, and sorceries had been known. The reach of Grand Motholam — Ascolais, the Ide of Kauchique, Almery to the South, the Land of the Falling Wall to the East — swarmed with sorcerers of every description, of whom the chief was the Arch-Necromancer Phandaal. A hundred spells Phandaal personally had formulated — though rumor said that demons whispered at his ear when he wrought magic. Pontecilla the Pious, then ruler of Grand Motholam, put Phandaal to torment, and after a terrible night, he killed Phandaal and outlawed sorcery throughout the land. The wizards of Grand Motholam fled like beetles under a strong light; the lore was dispersed and forgotten, until now, at this dim time, with the sun dark, wilderness obscuring Ascolais, and the white city Kaiin half in ruins, only a few more than a hundred spells remained to the knowledge of man. Of these, Mazirian had access to seventy-three, and gradually, by stratagem and negotiation, was securing the others.
Mazirian made a selection from his books and with great effort forced five spells upon his brain: Phandaal’s Gyrator, Felojun’s Second Hypnotic Spell, The Excellent Prismatic Spray, The Charm of Untiring Nourishment, and the Spell of the Omnipotent Sphere. This accomplished, Mazirian drank wine and retired to his couch.
-Vance, Jack. Tales of the Dying Earth
While on the one hand it is silly to defer overly to Dying Earth as somehow authoritative just because it was a particular influence of D&D magic, I think it has always been a particular influence for how D&D magic was conceptualized. Furthermore, since its post-apocalyptic setting is evocative of how the middle ages conceptualized lost knowledge of the ancients, and lot of the broader folklore of spells is tied to that particular cultural history, it taps into a broader trend in how magic is treated in fantasy.
Even where D&D settings eschew the magic as lost knowledge thing, the underlying assumptions of the Wizard class is that spells are a thing you find as loot in ancient dungeons, just as the underlying assumption for magical items is that you find the ones made in ancient times and that these are on par with and in many cases better than the ones from current times. Whatever attitude your setting takes there is a certain amount of "we pale before the magical mastery of the ancients" still baked into the basic game assumptions of D&D.
So I think imagining the spells in the PHB as just the remnants of some vaster trove of what spells were once known is, to some degree, the baseline assumption implied by the Wizard class. However, having all the spells assigned to spell lists that any character of sufficient level and class can choose, and having only one class who needs to discover their spells (and even they also get 2 each level for free) undermines this implicit mythology.
On the whole I think D&D's current implicit spell paradigm is very much "these are simply the spells that exist as intrinsic to the Universe". And since Cleric and Druid style prepared spell casting is the type that most demands this on implied lore grounds (the ones who wake up every day and decide which of all the firmly set spells of their class they will choose to access that day), and OneD&D has decided to turn all casters into Clerics and Druids, the future assumed lore is much more firmly "these are the spells that simply exist".