C
Based on the screenshots and the code supplied, it looks like the OP is learning Selenium by using a demo site on guru99.com.
While the code doesn't say where the pop-up is attempting to be closed, I have a feeling the attempt is on driver.switchTo().alert().sendKeys("Close");
This won't work. The alert() method is meant to switch the driver focus to a browser based alert, treating it like a new browser window. The pop-up in the image is NOT that type of alert, so Selenium doesn't know how to find it to close it.
The pop-up does look like a normal JavaScript modal. It has an 'X' button, an open button, a snowman menu (3 vertical dots). The solution is to find an element locator for the 'X' button and click it.
Something like, a bit of pseudo code so it won't work exactly:
driver.findElement(By.cssSelector("")).click();
Thread.sleep(5000);
Other than CSS Selector, you can also use an Xpath.
Normally, I wouldn't recommend a sleep, but to use a built-in wait (explicit wait) method that Selenium has.
Given that the OP seems to be learning, their current format is fine for this. I do want to encourage learning next steps which are to learn about Page Objects and to setup a solution using the Page Object Method.