It is rarer to find science fiction novels referencing fantasy but David Weber's "Off Armageddon Reef " does just that. He sets the link up nicely. A space faring humanity is hounded to near destruction by genocidal aliens so they establish a hidden colony where all technology is banned in the hope that these last few survivors will remain undetected. Hundreds of years later a stable if stagnant medieval society has developed and anti-progress anti-technology principles are enshrined in the universal religion. The story is seen through the eyes of a lone android who's mission is to try and infiltrate this world and re-awaken mankind's inventiveness and thrust for progress while preparing them for the inevitable clash with the genocidal aliens.
Armageddon reef is written as science fiction. Even though many of the characters live in a world of myth and magic we the readers are left in no doubt as to the scientific basis of all that happens.
Exactly the same story could have been written as fantasy. Weber could have written from the point of view of a humble farmhand living in this world who gets caught up in great adventures. The android would be introduced as a wizard in possession of ancient arcane knowledge and his technologies as magical powers. From a purely narrative point of view that might even have been better - leaving the reader guessing as to what is really going on until the underlying secrets are revealed at the end. That type of story has been done before by Terry Brooks and others however so Weber's treatment is refreshingly new.