I like simply setting the width of the element and the margin property to auto. In this way, the div will take up the specified width and the browser will make sure that the remaining space is split equally between the two margins.
If you would like to play with the images (some space between them, larger/smaller etc.), then I suggest a more complex solution and that’s flex box. However, it depends on the entire layout of the page and what else you have on the page. So, Can’t say what solution will be the best.