Hi Suraj,
Here is something quick I wrote up that creates an action for the "X" Esri close icon and allows you to have a trigger function associated with it. I also recommend you to take a look at the documentation of the esri/widgets/popup class to help you further: Popup | ArcGIS API for JavaScript 4.11
var exampleAction = {
title: "Example Action",
id: "example-action",
className: "esri-popup__icon esri-icon-close"
};
view.popup.actions.push(exampleAction);
view.popup.on("trigger-action"), function(event){
if(event.action.id === "example-action"){
}
});