Thank you , so far I have solved the problem by inserting a js code
You click on the green buttons this is a popup maker plugin and there is a nextgen gallery shortcode, in order for you to be reflected correctly, I put location.reload() when exiting the modeled window, and so only the newly opened model is reflected with the contents