Cruz used New York City Mayor Zohran Mamdani as the jumping-off point for a broader attack on communism.