The shooting prompted protests in New York City and Mayor Zohran Mamdani condemned the incident.