Even turning the water off to the toilet in the bathroom shouldn't stop that cold water supply pipe from leaking, if that's where it's coming from, as that would still be under pressure unless the mains was turned off.
The flexible pipe you are turning off, does that connect up into the bottom of the toilet cistern and then the leak stops? As suggested, that lower gray supply pipe does look damaged. The black soil pipe section on the left is a blank boss so it shouldn't be leaking there, unless it's been cored at some point and then blanked off and that's what's leaking.
The OSB3 to the left of that boss connector is that a webbed I joist? If so you may need to open that section up from above unfortunately.