Would you have a module to recommend to enlarge an image when clicking on it?
That would be to integrate a picture on a simple page via the editor and to display it small on the page but you can display the full size when clicking on it.
If you do not wish to do this directly using JavaScript, but instead wish to use a dedicated module, you have to choose a module that is compatible with Drupal 9.4 or above. The two you linked are not, and thus cannot be used. Additionally, I would strongly recommend only going with modules that have at least a couple of thousands of websites using it (Highslide, for instance, reports just 22).
That module looks much better. If it accommodates your requirements, I reckon it is entirely reasonable to proceed with that. Kindly note that installing a custom module like this requires you to assume responsibility for keeping it up-to-date moving forward.