WooCommerce offers a way to change the product images dimensions for both Single Product Image and images in Shop and inside archive pages
Go to Dashboard > Appearance > Customize > WooCommerce > Product Images:
You will get these options:
Those are the image options for the shop and archive pages. Here you can specify the width and height of the image, as well as the aspect ratio if you wish to crop them.
You can select an aspect ratio of 1:1 or use a custom ratio (example 3:4).
You can also choose not the crop the images by selecting the "Uncropped" option.
Note: the results of the image options will be displayed live inside the customizer while you're editing, however if you don't see a change on the front end, make sure to regenerate your old thumbnails with the Force Regenerate Thumbnails plugin.