From Summer22 we can use the new modules LightningAlert, LightningConfirm, and LightningPrompt instead of native APIs (window.alert(), window.confirm(), and window.prompt()) to create notifications from your Lightning web components. Unlike the window.*() APIs, these modules' .open() functions don't halt execution on the page, and they each return a promise. Use async/await or .then() for any code that you want to execute after the modal closes.