Well, for one, remember that you are making a fiction. Fictions should be a mix of creativity and facts.
Secondly, heavy research. Even if it's set in fictional location, you still need to do research! For example, my story's time setting is in Ancient China, but the location is fictional. I still have to do research on how the cultures was back then, how the government work, how they calculate time, etiquette, how some people in social class view others, etc etc.
I also had to research how the Emperor's harem works, how the Emperor's court work, the officials, the titles, the way they address themselves... it was a lot of work 🤣
It is fine to be unrealistic as long as it's not too much (having mobile phone in a setting that might be set around 100BC is too much unless you made the tech advance much faster in a fictional world). After all, you are writing a fiction not a documentary. That brings to the third point.
Avoid info dump. Yes, we want readers to immerse themselves into the settings but, we can do so without info-dumping lessons. For example, I could explain what a 'Di' child and 'Shu' child is in a paragraph, or I could show the readers conflicts between them so they could see how the two type of children is treated. I think latter would garner more interest than the first.