I have been told that Wiles's proof of FLT was based on elliptic curves. But yesterday I read from Takeshi Saito's book "Fermat's Last Theorem Basic Tools" that there is so called generalized elliptic curve, kind of proper flat scheme and whose geometric fibers are either isomorphic to either elliptic curve over an algebraically closed field or a Néron $n$-gon for some positive integer $n$. Is is so that somewhere in Wiles's proof he used generalized elliptic curves rather that elliptic curves?
The answer is that, "yes", Wiles's argument involves generalized elliptic curves at some points, in so far as (a) it involves arguing on various modular curves $X_0(N)$ and $X_1(N)$, whose cusps have a moduli interpretation in terms of generalized elliptic curves (as noted by [user40276] in comments above), and (b) it involves studying the bad reduction properties of elliptic curves over $\mathbb Q$, which can be described by extending these curves to generalized elliptic curves over $\mathbb Z$.
But this is not something to focus on, unless you are already familiar with many or most other aspects of Wiles's argument; it is a comparatively minor point. Essentially every argument in the arithmetic geometry of elliptic curves from the 1970's on which uses modular curves as one of its tools, including for examples Mazur's paper on classifying torsion, the Gross--Zagier paper, and so on, uses the notion of generalized elliptic curves; they are just one of the standard notions that belong to this area of mathematics.
I don't remember now, but it may also be that the actual phrase "generalized elliptic curve" doesn't actually appear in Wiles's Annals paper; the notion may just be there implicitly, encoded in various properties of modular curves that he uses, or other papers that he cites. (The standard background paper for properties of modular curves, where the notion of generalized elliptic curves first appears, is the paper of Deligne and Rapport.)