The following example uses the Grid layout and minimal popup content display. The minimal popup will display only the like and share buttons at the bottom of the image in the popup. You can control the column size, the space between images according to your requirements.
Masonry layout is great for images with variable height and width, where the grid layout is best for the images with equal width and height. You can easily re-order the images and instantly live preview the gallery when using the Gutenberg block. This example is using the Gutenberg block as well.