In Insert-Reference-Indexes and Contents, click this option. First of all, you set the title corresponding to your article according to the title level (you can add the title yourself if the font size is not suitable), then insert the table of contents on the last page and choose to automatically generate the table of contents.