I would like to create chrome extension that I can open dialog when click on icon example. I tried to use content script but it only work when I open new tab

In your manifest.json file
{
"name": "Get a popup panel",
"action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"manifest_version": 3,
"version": "0.1",
"description": "Open my own popup panel",
"permissions": ["storage", "activeTab", "scripting"],
"background": {
"service_worker": "background.js"
},
"host_permissions": ["<all_urls>"]
}
In you popup.html file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>My content here</body>
</html>
And in you background.js
chrome.runtime.onInstalled.addListener(function(){
// show here your welcome page
});