One of the most important aspects of writing is research. If an error throws the reader out of the story or provokes them to throw the book against the wall, you have failed.
For my unpublished (thus far) novel Battle for the Wastelands, its companion novella Son of Grendel, and the quarter-finished second novel Escape from the Wastelands, I had to do a lot of research on Civil War battles and weapons. Both Wikipedia and YouTube proved quite useful, as I could quickly find out about different guns, then go to YouTube to watch them being fired.
However, a hard science fiction project I’ve been working on will require even more. There are plenty of books about the Civil War that won’t be hard to find, but finding a book from the 1980s about the Strategic Defense Initiative and in particular a proposed nuke-pumped laser is harder. Furthermore, it’s set in a future space-based United States Navy, so there’s an extra layer of research that simply Must Get Done if I want to sell to military and former military people.
My most helpful resource has been the public library system. Although you can get a lot of superficial information from the Internet, books are what’ll help you go deep. When I lived on the South Side of Atlanta, the statewide PINES library system was extremely helpful in getting me the information I needed. When I moved to the North Side, the Atlanta-Fulton library system and the Cobb County library system became my new mainstay. Libraries often have books that bookstores don’t. One of my big research sources for Battle for the Wastelands was the series Daily Life In…, in particular the ones about Victorian England, the United States during the Civil War, and the 19th Century American frontier. Those books were apparently fairly limited in terms of press run, since the Amazon price for each one is around $50. They’re especially valuable because although many history books cover big-picture items like wars and the reasons behind economic shake-ups, they won’t go into detail about how people lived, what they ate, etc.
Writing groups are another source. Different group members often know a lot about particular topics. For example, a member of one of my writing groups knows a lot about firearms. During a critique of Son of Grendel, he pointed out that I should depict insurgents firing modern assault rifles on full auto reloading, since this goes through bullets VERY fast. Although I’d depicted them having to fight the guns dragging upward, I’d forgotten about that even though it’s fairly common sense. Another group member is a retired Army sergeant who’s been quite helpful in areas of military protocol and tactics, including a scene in Son of Grendel where a colonel is directing soldiers during a firefight while on horseback — he might as well be wearing a sign that says “Kill Me” — and a scene in Battle for the Wastelands in which a sergeant oversees shooting drills.
Meanwhile, at least three members of my other writing group are retired military. One provided some good advice on portraying a military policewoman’s reaction to being hit on in a bar (probably not a good one), while another — a retired Navy submarine petty officer — provided a lot of material about Navy culture and protocol. He also informed me of the “one crew one screw” rule in which collective punishments are used to give all members of a unit incentive to keep troublemakers under control. I was sure to use this in Battle when a sergeant makes all members of a squad do “gaspers” (what I describe as “an unholy mix of squatting, push-ups, and jumping to their feet”) when three members get into an argument.
However, you’ve got to make sure you’re using quality material for your research. I remember (hopefully incorrectly) a history of Anglo-Saxon England I read in high school implied the Normans imposed the infamous “first night” on England after their conquest, but the historical evidence for this “right” even existing is rather spotty. If something seems weird, I would recommend looking for corroboration in other sources.