Alexandria Ocasio-Cortez is freaking out the news media. And it’s working for her.

She’s been on the job for less than two weeks and already has generated more national press coverage than some members of Congress get in their whole careers.

Not that it’s been all positive, of course. Far from it.

The news media — and not just on the right — doesn’t quite know what to make of Alexandria Ocasio-Cortez, the 29-year-old freshman representative from Queens who is a Democratic Socialist and proud of it.

Their inability to fit her neatly into a preexisting mold has resulted in a barrage of dubious stories, out-of-touch tweets and cable-news weirdness, the likes of which we’ve never seen before.

And, in just about every case, Ocasio-Cortez has flipped critical coverage on its head and continued to make her points — not always with perfect accuracy but with pitch-perfect tone and effectiveness.

Over the weekend, for example, she drew fire after she criticized CBS News’s spirited (if tone-deaf) announcement of its 2020 campaign team. A graphic showed 12 reporters and producers, not a single one of whom was black.

She tweeted: “This WH admin has made having a functional understanding of race in America one of the most important core competencies for a political journalist to have, yet @CBSNews hasn’t assigned a *single* black journalist to cover the 2020 election.”

“Unacceptable in 2019,” she concluded. “Try again.”

Josh Kraushaar, politics editor at the National Journal, took his shot: “Another thing AOC has in common with Trump: media scold.” And, besides, he posited, the CBS group looked diverse to him, “with the exception of lacking an African-American.”

Her comeback was scathing: “Do you understand how fundamental the black experience is to American politics? And to American history? One race isn’t substitutable for another. It doesn’t work like that. It’s not about ‘quotas.’ It’s about understanding the country you’re living in.”

By the time the dust settled, CBS News was promising that the initial announcement was only the beginning of their still-growing team.

Do you think that expanded team will include some black journalists? I’ll happily take that bet.

But is her superior social-media skill really what defines an outstanding member of Congress, some seemed to be wondering.

Ocasio-Cortez wasn’t about to let that go unanswered (even though it was a kind of compliment), responding that she had already co-sponsored bills in support of D.C. statehood, comprehensive voting reform and more, and would be “dropping my first original resolution soon.”

Beyond social media there have been the incessant off-key stories about her wardrobe, her worries about affording rent in her district and in Washington, her college-age dancing caught on video, even — horrors! — her occasional nickname, “Sandy.”

When she made a significant factual error in stating that $21 trillion in Pentagon waste could cover Medicare for all, and then seemed to suggest on “60 Minutes” that such errors weren’t all that important, she was slapped down hard by media across the political spectrum.

Having lavished her with positive attention, commentators seemed to feel a palpable joy in taking her down a few pegs.

It’s all way out of proportion — powered, in no small part, by unacknowledged sexism. (How often do you hear the word “scold” applied to men? Not never, certainly, but not nearly as predictably as to outspoken women, the same ones who should modulate their voices and smile more.)

Just what is it about Ocasio-Cortez that is flipping everyone out?

The historian and author Rick Perlstein offered some answers in a recent New Yorker interview with Isaac Chotiner.

“It’s a profoundly generational phenomenon, and, clearly, it’s scary,” he said. Perlstein sees Ocasio-Cortez as part of a generation that doesn’t bear the lingering psychic wounds of a Democratic Party stunned into wimpiness by the Reagan era and its aftermath.

Senate Minority Leader Charles E. Schumer (D-N.Y.) and House Speaker Nancy Pelosi (D-Calif.), in the felicitous phrasing of James Poniewozik of the New York Times, were “looking unfortunately like a cross between Grant Wood’s ‘American Gothic’ and the twins from ‘The Shining.’ ”

Whatever it was that was needed in that crucial moment, they lacked: Spunk. Passion. Vitality.

A few minutes later, Ocasio-Cortez made her first appearance with Rachel Maddow on MSNBC, and exhibited precisely those qualities. She practically jumped off the screen into the nation’s living rooms.

Yes, she’s green (in more than one sense). She has made some clumsy mistakes. But she’s authentic, fearless and unpredictable — with beliefs that seem to have, at their core, a moral humanity.

And in the jaded, prepackaged world of Washington politics and media, that seems to make no sense at all.