At the Parkchester apartments in the Bronx, neighbors heard the news from a maintenance worker: The woman down the hall had just won a primary and was probably headed for Congress. At a popular restaurant in Union Square in Manhattan, workers struggled to comprehend that the young politician whose face was all over TV really was the same woman who had tended bar until a few months ago.

And on the streets of Midtown Manhattan Wednesday morning, the candidate herself was trying to make sense of it all. Alexandria Ocasio-Cortez stood outside Rockefeller Center after appearing on MSNBC’s “Morning Joe,” juggling phone calls and live TV interviews and the well-wishes of doormen and office workers on their coffee breaks.

“I’m used to people kind of knowing me in the community,” said Ms. Ocasio-Cortez, 28. But to have a stream of random people walk up and ask to take a selfie with her? “Insane.”

Ms. Ocasio-Cortez, whose résumé up to now included waitress, children’s-book publisher, community activist, member of the Democratic Socialists of America and former Bernie Sanders campaign organizer, was now something else: an instant political rock star. She stunned the Democratic establishment by beating one of the senior leaders in the House, Joseph Crowley, in a near-landslide in Tuesday’s primary.