The Dungeon Master is in charge of creating the main lore of npcs, magic, and the world as well as anything pertaining to the story.

Players are responsible for their own lore, the only rules here are that they don't not go against the dms wishes or interfere or involve themselves with another player's lore unless granted permission first.

If a dm makes some lore relating to a character's lore they need to talk to the player about it first, though sometimes you can get away with something as long as it doesn't change the character lore by much at all and just has a small influence.