New York City Mayor-elect Zohran Mamdani’s campaign set a blueprint, with content engineered for an online electorate.