Often that answer is yes. Or no.
Or might be.
The truth is a mixture of all of the above. Writers do tend to incorporate their own personal experiences into their writing. How much is dependent upon what they are writing and whether it's relatable. Writers also tend to not answer the question. Because what fun would that be?
My debut novel, All About Annie, is a classic example of how this all comes together. The book, aboout a woman who sees herself in the pages of a bestselling mystery, has her wondering, is it real? Is she imagining things? Why would someone write about her?
Among friends and relatives who've read the book, there are those who insist half the book must be from my own past. Others who insist none of it relates to me. But they all want to know if it does. And I would never tell. Some think they are in the book. See themselves in there. Which makes me secretly smile and nod. I've done my job. Made them wonder. And this is the beauty of fiction.