Recently, there has been some discussion on social media about "writing what you know." Some believe a writer should only write what they know. This is a stupid rule.
If writers followed this advice, we wouldn't have any historial stories, fantasy, futuristic stories, or sci-fi.
Better advice is to write what inspires you and do your research.
I'm more uncomfortable writing a contemporary story than a historical one. Technology changes so much that I can't keep up with it, and I feel out of touch with modern times. I must have an old soul. I'd rather spend time researching historical periods to write about.
I've never been to Scotland, but I've written more than one story set there in medieval times. I read travel blogs by people who'd visited the places I wanted to use for my settings, and I read Walter Scott books with detailed descriptions of these areas. Google Earth was also really helpful. I even found sites dedicated to historical Scotland with specs for hill forts. Written accounts by various monks also helped me get a feel for that time period. There are also archaelogical websites that have a wealth of information.
Writing what you don't know is possible.