Yes, NYC had factors that made it particularly susceptible in a global pandemic of Covid-19: (1) high density (as you say), (2) lots of international travel to and from NYC, (3) heavily used public transit (covid virus lifespan on metal surfaces -- like poles people hang on to in subway trains -- is long).