I bought a Knog Scout. It’s small, hard to spot under the water bottle holder, hard to remove, and hard to silence without the app. It’s basically an Apple AirTag, so if the bike is stolen, you can track it until the alarm is destroyed. There is a silent mode, where the alarm doesn’t sound but tracking functions silently and unobtrusively. That would presumably give you a greater chance of recovery, but no deterrence. A single overnight charge gives you several weeks of standby function.
Those are the plus sides. On the down side, the alarm isn’t very loud, and a cool thief would just ride off with the bike anyway. The app only functions within Bluetooth range, which isn’t usually sufficient for a cafe stop. (Tracking, however, functions independently.) When you are in Bluetooth range, the app keeps sending you notifications saying it has just connected, no disconnected, no connected, no … Because of a glitch, when you turn to the app after being out of range, you can’t actually turn the alarm off until you have closed and reopened the app again. If you leave the bike alarmed in your storage place at home (as I do), your wife will set it off when she gets her bike out (it is very sensitive), but can’t turn it off because she doesn’t have the app, it doesn’t work with Android anyway, and you are out at the time.
I feel it would be a moderate deterrent, coupled with some medium-grade locks. Both these things seem most likely to deter when two or more bikes are fastened together into an unwieldy tangle, and preferably to some fixed object too. When we are touring, that’s what we do. At home, the alarm is just one of several layers of protection to make life difficult for thieves.