pure luck…
It is true, that you can win games reacting to your opponent's mistakes, there is, however, a lot more you can do. For example, at the beginner level, learning principles and fundamentals, training tactics and making sure you don't make mistakes. Chess wouldn't be that much fun and interesting it is if it was all luck and play based on the opponent's mistakes only.