Add CPT plugin in your WordPress, then after create a Post type with plugin after create post type its appear in left side WordPress menu.
Create Custom post type with CPT Plugin
After create gallery post type click on ‘Add New Post‘ and upload your post gallery image.
Onces you upload all image images on gallery custom post all show in post
Below code for fetch gallery custom post type post
Code for copy paste and fetch custom post type entries:
<?php
$args = array( 'post_type' => 'gallery');
$the_query = new WP_Query( $args );
?>
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div><?php the_title(); ?></div>
<div class="entry-content">
<?php the_content(); ?>
</div>
<div class="post-thumnails">
<?php if(has_post_thumbnail()):?>
<img src="<?php the_post_thumbnail_url(); ?>" alt="<?php the_title();?>" class="img-fluid" />
<?php endif;?>
</div>
<?php endwhile;
wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>