Mamdani-backed candidates took key victories in campaigns that pushed the political establishment to the left.