You should really learn the Gimp tools, for lining up layers there is the alignment tool.
https://docs.gimp.org/2.10/en/gimp-tool-align.html
and you might use it like this: https://i.imgur.com/WX6swlP.mp4
However if you go to this post https://www.gimp-forum.net/Thread-Rotate...ree?page=2 the attachment there contains two scripts and one of them Multiple-Layer-Actions.scm an old script but will do what you require providing the image is not complicated.
edit (Use ofnuts script from your other post for resizing layers - Multiple-Layer-Actions loses transparency)
Edit: forgot that Gimp 2.10 does not automatically add alpha so with Multiple-layer-actions.scm You can to all layers (as three separate applications)
add apha
center all layers
all layers to image size.
https://docs.gimp.org/2.10/en/gimp-tool-align.html
and you might use it like this: https://i.imgur.com/WX6swlP.mp4
However if you go to this post https://www.gimp-forum.net/Thread-Rotate...ree?page=2 the attachment there contains two scripts and one of them Multiple-Layer-Actions.scm an old script but will do what you require providing the image is not complicated.
edit (Use ofnuts script from your other post for resizing layers - Multiple-Layer-Actions loses transparency)
Edit: forgot that Gimp 2.10 does not automatically add alpha so with Multiple-layer-actions.scm You can to all layers (as three separate applications)
add apha
center all layers
all layers to image size.