Every block has a unique identifier - 'class' or 'id'.
You can edit the gallery template the same way as your other templates:
wp-admin/theme-editor.php - 'gallery-template.php' (or 'gallery-pro-template.php') and 'gallery-single-template.php' (or 'gallery-pro-single-template.php') files.
You can use the same classes or ID's for these elements, or add HTML elements and change the page structure.
If you would like to know more details or have some other specific questions, please create a private ticket on our support forum, in which you can share the URL of your website and the gallery page.