If you want to pick up the lore organically in-game then you're going to need a notebook and have to play space detective/archaeologist. Start with the Codex, Knowledge Base, and the Pilots Manual in-game, make notes of any names or systems you might want to learn more about. Try flying to those systems, look for tourist beacons and other points of interests. Dock at stations in systems you think might be significant, read the local newspaper feeds and look for any articles outside of the usual status report type stuff. Keep taking notes, keep flying to different systems. Follow the clues and see where it takes you. Sometimes you'll find something called a "listening post" or an "unregistered comms beacon" - scan it and see what info comes in. Often it'll mention other systems in its transmission, along with fragments of broken code. Decode the codes; find the other listening posts in the other systems; oftentimes there will be three beacons and each beacon will hint to the other two. Frequently there is an additional location to be found by triangulating the positions of the three beacons and finding an additional system partway between them.
Eventually your sleuthing will lead you to space installations, planetary surface sites, ship crash sites, and megaships. Most of these will have something in them that you can scan with your data link scanner to unlock a block of text or an audio log. Occasionally these logs will point you towards yet more systems and beacons and codes and so on, most of the time they will be the end of the line and you'll have to stumble across a new breadcrumb trail to find the next thing. There's your lore.