Auto Layout is rule based, so you have to get the rules correct for it to work.
You also need to set the images to use Aspect Fit or Aspect Fill so that the image itself doesn't stretch or skew. That'll maintain the image aspect ratio.
Checkout Chapter 2, I covered a lot on Auto Layout and had a multi-button layout code exercise that would help you.
I find StackView to be more challenging to work with, unless you want three items in a row or a single column.
Any complex layout using StackViews in my opinion becomes very hard to work with without a deeper understanding of Auto Layout constraints, in addition to content hugging, stretching, and priorities.
My other frustration with StackView is that it hides content sometimes depending on what you put in it, which requires that you set constraints (you can't avoid constraints) to get your views to reappear.