Most of the time a popup will show in a consistent position in your automation sequence. Then, you can place a Click or Close Window at that spot and set the ‘ContinueOnError’ to True if it doesn’t show.
Sometimes, however, there are popups not associated with the application you are interacting with, and it’s difficult to know when the popup will appear. In this scenario, it is usually good to have good error handling retry mechanism, and ensure the application that the popup associates with is included in either the Kill Processes or Close Application .xaml part of your project. This way, the popup gets closed, when it causes an error to occur, and the transaction or part of your process that failed gets a retry attempt.
For parallelism-type solutions, where random popups are being watching concurrent to the process running, do some searches on the forums. However, in my own experience, I have not seen or used a solution like this.
This feature is still fairly new, and unfortunately, I haven’t had the chance to utilize it in my own projects. I remember reading this topic and it was very informative: #FeatureBlog - 18.4 - Global Exception Handler
There are other topics on this if you do searches on the forums.
Regards