Often on the site you need to display the image in a popup window, for this in the Drupal there is a very popular Colorbox module:
composer require drupal/colorbox drush en colorbox
After installation we need to go to the module folder, find the README.txt file and find a link to the colorbox library
After downloading, you need to unzip and rename the colorbox-master folder to colorbox and put it in the libraries directory located in the root of the site. If you don't have this directory, create it.
I have a Gallery content type with multiple Images fields, let's set the colorbox for this field:
We also have various display settings available
I've left them like this, you can put them under yourselves. You can also change the settings for yourself, which are in the module settings. I left the default settings
I added a Gallery page to upload some photos:
That's what it looks like when you click it:
If you place the images in one line and add margin between them, they will look good.