I would recommend starting with the introduction section of one of the rulebooks. The big ass rulebooks lay it all out for beginners, from the history of the imperium to an overview of the various alien factions. From there you can dive into novels and stuff.
The 3rd and 4th edition rulebooks are my personal favorites, although those are pretty dated if you're looking for modern lore on Primaris marines, Votann, new Eldar factions, or the return of the Emperor's holy sons [REDACTED] and [REDACTED].
If you're interested in a specific faction, that faction's codex will have reams of lore.