The expensive part of a water leak is rarely the plumbing repair. It is the damage done while nobody knew about it.
Leak detection devices address that gap. The simplest are battery powered sensors placed where water would appear first: under a sink, beside a hot water unit, behind a washing machine, in a laundry. They alarm when they get wet. They cost little and they solve the specific problem of a slow leak running unnoticed in a cupboard.
More capable systems monitor flow at the water main. Because they see everything entering the property, they can recognise patterns that indicate a leak, such as continuous low flow that never stops, and some can close a motorised valve automatically when they do.
An automatic shut off is the part that matters when nobody is home. A sensor that alarms to an empty house limits nothing; a valve that closes does.
None of this replaces knowing where your mains stop tap is, and none of it prevents a leak. What it changes is how long a leak runs before someone acts on it.
For a burst pipe or a serious leak, turn the water off at the mains tap before you call. If water is anywhere near power points, the switchboard or light fittings, stay clear and treat it as an electrical hazard. Do not enter standing water in a room with live power.