I handle this differently.
There is a book in my world called Librum Magicum. It was first written by the first Archmage, and it essentially contains everything you'd find tin the PHB Spells section, the Monster Manual, and the DMG magic item section. It describes them much the way an Encyclopedia would describe them. It also describes my planar structures, the Gods, the other Powers (Archfey, Archfiends, Demon Lords, etc...)
It costs 2 gold and there are copies everywhere. Any PC that can cast spells or has an education is deemed to have been widely exposed to it. Thus, there is an in game reason for PCs to know a lot of things.
The caveat: This is generally old information, and the world changes. The information on the spells is sufficient for a spell caster to figure out that spell when they have the capability to learn it, but there are far more spells out there in the world - and there are variations on many of the PHB spells. The same is true of monsters and magic items - you may know the general lore, but that doesn't mean you'd recognize the orcs and centaurs that form the basis of the horde that sweeps the Great Plain. It doesn't mean that dragons are just as they are described in the tome.
When PCs encounter monsters and magic, there is a good chance that I've modified it. I have thousands of homebrew monsters, spells and magic items. If you ask my players about the more iconic monsters from my setting, they'll describe beasts like my Axemorph Demon (based upon the Dreamblade figure), My Bunnyfish (an entirely surprising and distinct homebrew monster), and the hordes of dwarven and gnomish constructs that are used as war engines. If you ask about the magic items that they treasure, they'll tell you about the Crysteel Axe (a Crystal Metal axe made of the hardest substance in existence and capable of mighty war magic), Platform Boots (that summon a 15 foot tower beneath the wearer - but fasten him to the tower for 1 minute ... items that have saved and taken many a life), and the Staff of the Archmage (designed when I was still a teenager, this staff does things I still have not seen in any official product). If you talk about spells, they'll mention Deflection (like Counterspell, but instead of negating the spell you change the target), Wraithform (based on an old 2E spells, this gives you the best of flight, invisibility, and gaseous form), and Ar-mage-edon (a 12th level spell - It is to Meteror Swarm what Meteor Swarm is to Fireball.
So in the end - yeah - players generally have access to what is in the core books ... but it might not be right ... and it is all in game knowledge that makes sense.