check out this previous post/topic for additional context:
Seems like that is done on the codepen side?
Make the preview “Click-to-Load” : Check the checkbox next to “use click-to-load” to enable the preview version for your embedded Pen. Preview embeds show a static image preview of your Pen with a “Run Pen” button. When your visitors click the button, the Pen will load.
via: https://blog.codepen.io/documentation/features/embedded-pens/