anachronism
When an object doesn't fit in the time period a work of fiction is set in, usually due to being invented, created, etc. years after the time the work is set in.
Example: A smartphone appearing in Victorian-era Britain or Aztecs in Edo-period Japan.