shortcode execution when the page is opened

No, shortcodes do not work this way as they are parsed on the server-side and replaced with the relevant content before the page is sent over to the visitor’s browser.

What you could do is to place the shortcode within a hidden element (like a <div>), then have JavaScript/jQuery unhide the hidden element’s content when a button is clicked.