word-forming element used to make verbs, Middle English -isen, from Old French -iser/-izer, from Late Latin -izare, from Greek -izein, a verb-forming element denoting the doing of the noun or adjective to which it is attached.
The variation of -ize and -ise began in Old French and Middle English, perhaps aided by a few words (such as surprise, see below) where the ending is French or Latin, not Greek. With the classical revival, English partially reverted to the correct Greek -z- spelling from late 16c. But the 1694 edition of the authoritative French Academy dictionary standardized the spellings as -s-, which influenced English.
In Britain, despite the opposition to it (at least formerly) of OED, Encyclopaedia Britannica, the Times of London, and Fowler, -ise remains dominant. Fowler thinks this is to avoid the difficulty of remembering the short list of common words not from Greek which must be spelled with an -s- (such as advertise, devise, surprise). American English has always favored -ize. The spelling variation involves about 200 English verbs.
Others are reading
<a href="https://www.etymonline.com/word/fantasise">Etymology of fantasise by etymonline</a>
Harper, D. (n.d.). Etymology of fantasise. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/fantasise