In Photoshop, the same sequence of processing on layers of each image in a batch can be applied to those multiple images by using File > Automate > Batch > Action then select the group of images to process. How can the same macro be done in GIMP?
No macro capability in Gimp. If this is a single operation, there is a BIMP plugin to repeat an operation on several images.
Otherwise you have to write scripts.
Another solution is to use an application designed to work from shell scripts, such as ImageMagick, but we would have to know what you want to do exactly (add a watermark?) to be more specific.