I believe that no matter what type of story you write, there’s going to be lore involved. The story/world that you create is going to have history. I don’t mean history of how you came up with the idea. I mean, history as in the world and everyone in that world is going to have a past.
Lore is one of the last things I think about through the creative process. Typically, I tend to dream up of a certain type of character and try to place them in all types of settings until I find one that they fit in. I don’t think about the lore until much later. It usually comes into fruition all on its own.
As the story develops, the ‘truth’ of the world starts to unravel bit by bit. I find it easier to let the lore develop on its own. If I need something to be held true like a kingdom invaded a thousand years ago or something along those lines then, I just have that happen.
The way I tend to create the lore is by starting out with general concepts. I look at the big picture like a major event. After I have some of that figure out, I look closer at the details. I mentioned an invading army before. With looking at the details, I figure out why the army invaded, what was the cause, who invaded who, etc.
Personally, I think having an overall concept of what you like the lore to be is a good place to start. There’s nothing concrete and the details/concepts can be molded to whatever it needs to be for the story.
At times, when I set something in stone before the story, I find it difficult to incorporate it into the story. For some reason, my brain is stuck in that little box I created before and I end up stressing myself. It’s good to have some flexibility when writing lore and everything else. Sometimes, inspiration strikes when you least expect it.