A Raycast extension with one command, Clear Notifications, that closes everything in the macOS Notification Center. It's a short AppleScript that walks Notification Center's interface and presses Close or Clear All, matched in eleven languages.
TypeScriptRaycastAppleScript