Writers know stuff. Not stuff like spelling and grammar, because there’re editors for that. But stuff like how to kill people (most crime books), and get away with it (some crime books). How to fight with a sword (most fantasy books), how to tan leather without chemicals (I learned this through Stephen King’s Dark Tower series), how to mix cocktails (James Bond and The Hitchhiker’s Guide to the Galaxy), what the wingspan of a dragon would need to be (The Pern Chronicles).
Writers have to know this stuff, because if the reader sees something, and it’s obviously wrong, they lose faith in the writer and anything else they’ve written.
If their main character is a blacksmith, then the writer has to study enough about being a blacksmith to make it believable, even to a blacksmith. If the villain kills people with poisons, the writer has to study enough about poisons to know what’s readily available, from where, how to mix them if needed, how to administer them and what side effects or tell-tale signs there would be from using them. If writing something set in some point in history especially, the author has to learn about the relevant history, politics, technology and language used. Unless they’re writing a Hollywood film, then they can just make it up.
Writers are continuingly learning new things for new characters and scenes, and as those characters grow so too does the writer’s knowledge. The first time a character is introduced, the background knowledge needed can be just enough for passing references, but if the character has been developing for three or four books, then off hand remarks won’t be enough and the writer really must know their stuff. It’s said that writers have to do their research, and it’s very true, they must. And this is a good thing.
So if you want to keep learning, start writing.