Fines/violence, usually.
It’s actually not uncommon to have laws that restrict gathering rain water in many places. Lots of US states do as well. If water is collected locally on a mass scale, it messes with water tables/rivers/lakes/etc.
Forbidding it when a place doesnt have otherwise dependable water infastructure is inhuman however.
I imagine the ban on rainwater collection is from before the war, and I imagine there are similar laws in Israel.
There’s lots to be mad at the Israelis for doing. We don’t need to make things up. This article on water in Gaza makes a good point:
A graphic representation of the unfair restrictions is that while many Jewish settlements have swimming pools, Palestinians in “Area C” of the West Bank are not allowed cisterns for collecting rainwater.