A Manhattan judge has upheld New York City’s two-year rent freeze for nearly one million rent-stabilized apartments, rejecting a lawsuit filed by landlords seeking to overturn the policy and delivering a major legal victory for Mayor Zohran Mamdani.