This is a good maxim for any fiction writer because when one does not know a fact there is a big temptation to make it up. Even fantasy writers base their stories on some element of knowledge which can be scientific or more commonly mythological. As a former professional scientist I sometimes place some science into my narratives. In the early days of my writing, I consciously steered away from this as I did not want the science I published to be confused with my fiction. I even published my fiction under two pennames to make doubly sure that this confusion did not happen. But now more than ten years have passed since I retired from my microbiology job so I have started to write under my own name. This is not only because I want to be recognised by what I have achieved but it allows friends and family to easily find my work.
I am used to research and I know where to go to find the information I want. The internet is a brilliant tool to enable this. In my younger days I spent hours in a library to research a topic before embarking on an area of scientific study and even after the study was completed I had to spend more library time in checking that the references I used in my written reports were sound. Then later on time spent doing this on a PC made the whole process simpler and quicker. There is now a whole growing branch of study involved with this known as Informatics.
But the best way to seek the knowledge needed for a piece of written work is to utilise your own experience. This may be by recalling the geography of the area where you were brought up or by remembering the characters you have met. The latter should be carefully portrayed to avoid offence and the best way to do this is to only select some of their traits, to mix these with those from others and never use the real names of people you know.