Fiction books are mostly based on imagination. They create new worlds and stories that don't have to be real.
Mostly, fiction books are products of pure imagination. Writers can come up with all kinds of scenarios and characters that don't exist in the real world. But sometimes, they might draw inspiration from real-life events or emotions and build a fictional story around that.
Fiction books are typically not true. They're the result of a writer's creative mind. However, some elements within them might have a hint of reality, like a character's personality being similar to someone the author knows, but the overall story is made up.