Hello,
Navigate to Appearance > Customize > Woocommerce > Product Image and set the images size.
You can define the “height” of the shop thumbnails by setting up the width:height
aspect ratio in the “Thumbnail cropping” section:
Custom: In Custom you can select the aspect ratio of the image. Here are some of the popular aspect ratios (1:1, 5:4, 4:3, 3:2, 16:9 and 3:1).
Uncropped: Height of the image will be untouched. Images will display using the aspect ratio in which they were uploaded.
https://ibb.co/6mR6DbD
Also, follow this guide:
https://xtemos.com/docs-topic/image-size-and-content-alignment-in-a-product-grid/
Best Regards