You have two conflicting requirements here:
- The gods want people to know about their rules, and to follow their rules
- The gods do not want people to start pestering them for services
Positive reinforcement (rewards) or negative ditto (punishments, like flooding the place) becomes difficult because if the gods show up and display their Powers Of Awesomeness — by miraculously conjuring up these boons or calamities — then point 2 becomes impossible to achieve. But if they do not show up to speak directly to us, it is hard for mankind to find out what the rules are.
Mankind has been able to figure out quite a few rules about the universe, without any divine figure telling us what they are. We have a tool for that. That tool is called science.
Science builds on two important things:
- Being able to observe a behaviour of reality
- Being able to consistently predict and reproduce a behaviour of reality
If we can do those two things, we can figure out the rules. Now the gods do not want to be observed here. But that is not actually needed. They just need mankind to realize that some actions result in good things for them, and some result in bad things.
So the gods will enforce their rules by anonymously providing rewards and/or punishments for certain behaviours, and they will do so in a consistent manner.
Drink alcohol, on a weekday and you will get a fantastic hang-over. But do it on Friday Evening until Sunday afternoon, and you will never suffer any ills.
Make a kitten purr, and you will inevitably experience good fortune within 24 hours. Make a kitten sad, and some kind of malady will happen within that same time-frame. No exceptions, no escape.
...and so on. As long as your gods are consistent and clear about these rewards and punishments, but stay anonymous, then mankind can soon enough figure out what behaviours are "good" and which ones are "bad" without actually knowing that there are any gods behind it.
By the way... if I was a god in this universe of yours, I would make any kind of prayer, grovelling, proselytising or trying to assert authority by reference to the divine punishable by an instant gential rash and tooth ache. That will teach people real quick to not try to call upon the divine.