In the history of literature, science fiction is a recent thing, which is accompanied by the emergence of modern science and the development of the modernization of the world. Before that, although fantasy literature was widespread, But there is an insurmountable gap between Dante's Divine Comedy and Mary Shelley's Frankenstein.The essential requirement of science fiction is the core of science, and the core of scientific spirit must be agnosticism, which is a fantasy that opposes obscurantism and lives in science before it can be called science fiction.
that science fiction:
Appeared later