The mistake the user has most likely made is:
They did not add captions to the figures correctly.
Captions are necessary for generating a table of figures, as they provide the labels and references needed for the entries in the table. If captions are not correctly added to the figures, the table of figures will not display the correct names.