If you want to set a fixed height of woocommerce main image then you have to use a custom css code to your theme. Different themes class could be different but here is the most common classes i have found.
I am using Astra theme and here is my code that you can try:
.woocommerce div.images a img {
height: 600px! important;
object-fit: contain ;
object-position: top;
}
You can make changes on the code based on your needs.