The first Democratic mayor in three decades was elected by stressing affordability and opposing Trump’s mass deportation initiative.