Images are appearing in different sizes on product pages because you haven’t scaled them in a particular size before uploading them to your website. The default resolution of images in WordPress is 800 X 800, but you can follow the steps below to make all images appear in the same size manually.
1. Crop/edit images in your preferred sizes before uploading them on your website.
2. For the existing images, you can scale them right from the WordPress media manager. You will need to change the height and width in the box shown in the screenshot.