Some writers write about what they know. Some writers delve into the unknown, exploring occupations, cities, countries, and even time periods they have never experienced.
With the latter, these writers will need to do research for their books--sometimes extensive research if the plot is complicated or they have no experience whatsoever in the setting they chose for their book.
Keeping track of all this research is essential, for several reasons.
First, if an editor or agent questions any content in your manuscript, you will have supporting documentation. Second, you may write something one day, then months later when editing, decide you want to look into that subject further. Third, if you decide to do a sequel to the book, you will need to reference this research again.
Keeping accurate records is a must. Look for specific ideas on how to do this,next week.