Custom post type, global categories — what’s the template name?

Because there’s no such thing.

If you use the same taxonomy for two or more post types then there isn’t separate archives for each post type in that taxonomy’s terms. There’s a single archive for that taxonomy that lists posts of both post types. This might not work for built in taxonomies (categories and tags) though, as they are configured to only display posts. To display your post type on the category archive you’ll need to use the pre_get_posts filter to add it:

add_filter(
    'pre_get_posts',
    function( $query ) {
        if ( $query->is_category() ) {
            $query->set( 'post_type', [ 'post', 'cptname' ] );
        }
    }
);

If you need separate archives for categories for each post type, then you need to register a separate taxonomy for your post type. Something like cptname_category. They won’t share terms, but they will have separate archives.