I missed a couple of steps above. You'll need to import UserNotifications in your ContentView.swift, and you'll also need to enable notifications as alerts for the test app. I guess one question is whether it's supported at all? It builds and runs fine, and is listed as supported in the documentation:
https://developer.apple.com/documentation/usernotificationsui/unnotificationcontentextension
But then this page says "Notification content app extensions are supported only in iOS apps."
https://developer.apple.com/documentation/usernotificationsui/customizing_the_appearance_of_notifications