Sound Recognition is a powerful iOS feature.
Smart home alarm systems are all the rage, but they’re also very expensive. A relatively simply setup can cost hundreds of dollars, with things like glass-break and leak sensors driving process up. Or you can use this iPhone trick.
Scroll a bit down in the Accessibility tab in Settings, you’ll find a tab for Sound Recognition. Switch it on and your iPhone will listen for over a dozen sounds using on-device intelligence and “notify you when sounds may be recognized.” Sounds are organized by category and include many common sounds.