Arduino/Water Flow Sensor If Else NOT WORKING

However after that it does not loop and turn back on.

So put in a serial print to see what value you are reading from your sensor. That will tell you what is wrong.