You may be right in your deduction, but there were other important differences between these countries too, notably rigorous testing and contact tracing. Also, at least in the case of Taiwan, immediately stopping all people flying in from affected areas, so no continuous stream of new spreaders.The useful Worldometers website graphically demonstrates the dramatic power of universal wearing of surgical masks to slow down the pandemic:
I don't need to tell you that correlation does not imply causation!