Custom post type archive page not showing on archive-posttype.php

Custom template should be archive-gallery.php instead of archive-posttype.php

It’s archive-$posttype.php where $posttype is the custom post type slug.

WordPress first looks for archive-$posttype.php and if it’s not available then chooses archive.php

Update

Same for the custom taxonomies also , the flow is:

taxonomy-$taxonomy-$term.php --> taxonomy-$taxonomy.php -->  taxonomy.php --> archive.php

So for gallery_categories custom taxonomy use taxonomy-gallery_categories.php

error code: 523