Something many writers do is that they set their stories in pocket worlds set inside the real world. For instance, J. K. Rowling set the wizarding world in England in a way that we (as “muggles”) can’t see the world the characters live in but it could still believably exist. Many writers tend to create fictional towns in a given spot on the map so they have the history of the region is set, the weather is already set by the real world, and the typical jobs of the town (whether it’s farming, technology, factory, or other things) are decided by what is typical of the area. If you decide to go this route, remember to use the nearby towns as a guide. Having a town built of stone when the nearby towns are built of brick or wood as there’s no quarry around would make you a laughingstock to many readers or merely unbelievable so people won’t buy your book in that area.
Another thing to remember is that things that happen in your “pocket world” often affect the “real world” outside. J. K. Rowling realized that and made a comment when there was a lot of news in her wizarding world that the “muggles” noticed the increased owl sightings during the day and had a newspaper article on it. Anything major, such as an comet landing in your town or a town battle destroying the town, would bring notice from the outside world (such as the National Guard arriving or scientists showing up to take over). That can either be used as a part of your book, such as your characters hiding from the government, or you should have an explanation for why the government doesn’t know, such as news reports on something distracting the government or satellites.