Hello,
1) You added custom code https://prnt.sc/105tqf1 that caused issue with the single product gallery. I removed code and gallery images are ok https://prnt.sc/105tr69
2) Main single product image does not have a crop option, so it’ can’t be squared. If you want to limit height of the main product image use the code below
.woocommerce-main-image img {
max-height: 400px;
width: auto;
}
Regards