To easily shut off the water if the pipe breaks, you need to take care of the presence of special valves. This company can install them https://pomplumbing.ca/riser-and-zone-valves-replacement/ if they are not already installed. Well, if you did not have time to install the valves, and then it already started - call them - they have an emergency service that will immediately arrive and fix everything.