Democratic socialist candidate Zohran Mamdani, 34, is projected to defeat Andrew Cuomo in the race for New York City mayor.