From very early in the COVID-19 since January these countries adopted the policy of border closures, cruise-ship docking restriction, retesting people returning from other countries, putting them in quarantine, testing and tracing the contacts of SARS-CoV-2 positive cases, and sel-isolation of patients at home. They also adopted strict lockdowns, closure of schools and offices and introduced Apps to track down COVID-19 case.
This is how these countries have succeeded in limiting the disease and reducing the deaths due to COVID-19. (See attached links)