Chrome 137 introduces the newly-specced if()
function. Una Kravets posted a nice video overview and Temani Afif writes about it as well.
Creating an Auto-Closing Notification With an HTML Popover

The HTML popover
attribute transforms elements into top-layer elements that can be opened and closed with a button or JavaScript. Popovers can be dismissed a number of ways, but there is no option to auto-close them. Preethi has a technique you can use.