Heat the oil in a medium saucepan or Dutch oven over medium-low heat, then add the onion and garlic. Cook for 5 minutes, stirring occasionally. Add the zucchini, red pepper flakes, and a pinch of salt, and cook 5 minutes more. Add the water and simmer until the zucchini is tender, around 15-20 minutes.