Create a New popup
Insert pop-up name, title, and body text. 
Add a new trigger with default settings, choose "Click Open" and under "On Popup Close" then click add.
Click add new cookie and in the cookie name add the payload as cookie name: <script>alert("XSS")</script>
The XSS will be triggered when editing a trigger