As writer's we are also observers. We learn something every day whether that is a different way to describe a blade of grass or an emotion or even how a job is done. We often learn these things without even realizing it until we use it in a story. So, what happens when we want to write a story that has something we aren't knowledgeable about in it? Well, the obvious answer is we learn about it.
Sadly, the reason I'm writing this is I've witnessed people have a great story idea and they decide not to write it because there is something they don't know much about in it or they change it and there is plot hole or it isn't as rich as what they originally wanted to write.
Most of the time, I have witnessed this happen with new writers. I know it's terrifying putting something you don't know about in a book and I don't recommend that but I do want you to know you are teachable and you can learn about anything. Study what you don't know. Learn about it and eventually, you will be able to write about it with confidence. Don't shy away from it just because you don't know about it right now. Be curious, learn it and then, write it.