The simple answer is: You don't.
Punishing a cat, much like a dog, is incredibly detrimental to the animal. Spraying it with water along with shouting is likely to cause the cat to become scared of the owner or become aggressive. Some cats will try to hide certain behaviours (scratching or toileting inappropriately for example) away from the owner.
The best way to curb "bad" behaviour is to try and understand why your cat is behaving in such a way. In a lot of cases, sudden changes in behaviour are often caused by medical problems. Other times, it is caused by changes in routine that have stressed the cat, or the cat isn't getting the care/enrichment/environment it needs.
Some behaviours that are classed as "bad" by us are perfectly natural for a cat; exploring and jumping on kitchen counters and tables are part of a cat's nature. Cats are curious creatures and like to have a good view of the environment from a high place.
There are many ways to try and accommodate for how a cat acts, and there are ways of curbing unwanted behaviour such as scratching and biting without resorting to tapping the cat on the nose or spraying water in its face.