The numeric status code itself (404) is mostly for machine understanding purposes; the fact that many websites still render the number itself on the page is a strange quirk of the way that the web (and web servers, and online culture) developed.
It's fine for a PWA to use an HTTP 404 code locally -- for example for a service worker to return that status code when a URL is known not to exist either online or offline. You probably wouldn't want an HTTP 404 'locally' for something that 'could' exist if the user was online, because you don't want to cache the apparent non-existence of that content.
And then to the human/user side of the HTTP 404: it makes sense to display a relevant message to indicate to the person that the content was not found. That could be a generic "oh, we couldn't find what you were looking for" (localized), or it could be more context-sensitive -- "that conversation thread couldn't be found", for example.