Web notifications are typically implemented as a service worker, not a PWA. The api allows a the browser JavaScript to add a notification. Typically the JavaScript polls for the notice, and can only receive the notice if it is running. Thus the use of the service worker.
You are probably thinking of the o/s notifications, that don’t require a browser. While first available for mobile o/s most desks support now. There is a different api for each platform you want to notify. So typically you use a cloud provider which has support for all platforms and acts as a gateway. See azure communication service as an example