Clearly there needs to be a way for the parcel tracking app to tell the OS, “I am looking for plain text strings that match this pattern.”
Which iOS and macOS already have, they are called data detectors. When the message arrives notifying you of the tracking number, you can select “track this parcel” from the context menu. No need for an app to snoop on the clipboard.