- It is an island
- It has an effective, well centralized surveillance network
- It has (presumably) an obedient population, or at least, one that don't think personal freedom includes the right to spread the disease
- They were well prepared thanks to the their experience with SARS
- A good enough welfare system to allow people to quarantine without starving or getting ruined
- A good enough police force to make sure they stay quarantined
- Enough masks and hand sanitizer, with domestic production
This is pretty much the opposite of the US. Which is highly connected, with a loosely connected government that has little control over the private sector that runs the country and a highly individualistic population.
Also, maybe there are some populations that just do better for a mix of reasons: climate, race (genetics), culture, average age, health and population density,...
Final note: closing borders is only effective if you contained the epidemic and others didn't.