Mamdani's rise to power was guided by a number of New York-based socialist and Muslim groups, and they celebrated his win on Tuesday as their own.