The answer to the first is easy. Yes. Oh, yes, yes, yes!!! Your world, whatever it is, needs a framework, and research is the beginning of the frame.
How much research? Now that’s tricky. The answer is “enough”. How much is enough? I tend to err on the side of too much. I might not ever use that lovely tidbit I discovered about some archaeological find in Northern Europe and how it ties into my mythology. Or I learn more than is really needed about the physics of how my spaceships might travel though the void (as my poor ex-physics professor can attest). I need to know these things for me to make the world whole. The point to all the work is to make your worlds come alive for your readers. To let your characters move in a world founded on solid bedrock and not on shifting sand.
There is always the issue that there is someone out there who is a specialist in something you are writing about and will find a major flaw and pick at it—something a tiny bit of research would have fixed. On a TV show I watch, the characters spotted wormwood on a wall. All I could think was “you’d think a television production office would have a good enough research team to know that vine is NOT wormwood.” It still drives me nuts because the amount of effort it would have taken to get it right would have been so small.
Am I being too picky? Maybe. The problem is I am not the only one who is that nit-picky.
So, you’ve done your research, you know your history, or physics or the natural history of the lost species of the somethingasaurus—now what? Now you can settle into writing, referring to your research when needed. When you choose to deviate from the facts, you are making a conscious choice and one you can point to and say it was deliberate. Knowing your world and the framework it is built on is key in creating believability. Just don’t go overboard. I tend to find myself removing pages of really exciting research (to me) from stories because they really aren’t needed for the story, I just loved those little tidbits so much.
I still sneak a few in, and that’s the fun of it, the final pay-off of the research. Adding in one little thing that is off-the-wall but just so delicious it has to be there—and your readers will love you for it.