Are you referring to UIAlertController? You don't need an anchor. Just create the alert and present it. It will appear in the middle of the screen.
Nevermind. I just noticed this is posted in the SwiftUI section. My answer is for UIKit.
Topic:
UI Frameworks
SubTopic:
SwiftUI