webspinner Files Gallery simply reads IPTC and EXIF data fields that are already stored in the image. The data here may come directly from digital cameras and desktop software like Lightroom, Apple Photos or even just modified directly from the OS (right-click JPG, edit caption). So basically, it depends on what OS you are using, but you need to find a way or an application that can add/edit IPTC info.
https://iptc.org/standards/photo-metadata/software-support/
Files Gallery itself does not provide any mechanism to create/edit captions.