To create a settlement’s history, it can be beneficial to have already decided the history of the sovereign power to which it belongs. Is it part of one now or has it been part of different powers? Understanding where this settlement lies in relation to powers makes this easier to decide. Anywhere near a border has likely endured changes, but even places many days’ travel from the nearest border could’ve experienced change. This is especially true if an empire has ever spread over it.
A city a thousand years old has likely changed hands, but one only a few hundred years old might never have. Decide how long ago this settlement was founded. If large scale wars are rare in that area, it might’ve only changed hands a few times, but more tumultuous places might have experienced this every generation, or more frequently. What matters is how much of a melting pot experience the community has had. This can cause a mix of building styles, materials, customs, and certainly population. And if a different species is the conqueror, we’ll almost certainly have a more varied atmosphere than the mono-human one often shown in fantasy.
We don’t need to identify or discuss these wars. All we need is the fact of the settlement having been embroiled in one, and the resulting damage or destruction. There can still be toppled buildings around. There might be monuments to individual soldiers or generic ones who represent a conflict. If a power conquered the settlement, erected such statues or buildings, and then disappeared, are these items still pristine, gone altogether, or defaced? Have some been re-purposed, with their original meanings and inscriptions redone or removed so that the source is no longer apparent? Is a building abandoned? A tourist attraction? Such a building could be one native to the population, abused by conquerors, and still standing but unused, or taken over by vagrants. Sometimes these are an eyesore and sometimes they’re a source of pride.
On a practical level, we don’t need extensive details about which power it’s been a part of, because in most cases we’ll do little more than mention the fact in passing. We can just decide that it’s changed hands to this one or that one a certain number of years ago, and various relics are around town as a result. But it isn’t just structures but people who are affected, and their memories and attitudes about other places. Two places that were once enemies won’t always be, nor will two that are friendly always be. Persistent strong sentiment is rare and is usually fueled by something like religion or ethnicity. Opinions and sentiment change over time, provided that situations have changed, and what remains is subtler lingering dislike or prejudice.
We can also have events that took place within a settlement, such as discoveries, inventions, accidents, and failures. Great fires, droughts, earthquakes, and other natural disasters sometimes leave a mark on not only the topography, but the living memory of a population. In a world with magic or technology, good and bad acts are likely, the number of them dependent partly on population size and settlement longevity. Is our settlement famous for anything having occurred here? Will it be?
Settlements sometimes have local stories or legends. In a fantasy setting, this is arguably more common in villages and towns than in cities due to their lower education and worldliness, leading to myths. In fantasy, these may center on supernatural phenomena, such as magic or ghosts, even the appearance of gods. But in SF, these may be more technological in origin, such as first contact with alien species. Events are one way to create these, with a story surrounding those events. These stories often have missing details that could alter their interpretation, which also lends itself to there being misunderstandings about what really took place. Any unusual place or character, past or present, can cause lore. World figures who originated from here are good examples, and we can decide this person has unusual talents or skills that this settlement claims some responsibility for, though that’s only likely in the event of a hero, not a villain.