Print specific image size in galley loop

You can define your own post thumbnail sizes

add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150 );

This means that you change the thumbnail size overall.

Or you can define custom image sizes

add_action( 'after_setup_theme', 'wpdocs_theme_setup' );
function wpdocs_theme_setup() {
    add_image_size( 'category-thumb', 300 ); // 300 pixels wide (and unlimited height)
    add_image_size( 'homepage-thumb', 220, 180, true ); // (cropped)
}

and call it like:

if ( has_post_thumbnail() ) { 
    the_post_thumbnail( 'category-thumb' ); 
}