“Hi Nance,” Mr. Crowley greeted Ms. Pelosi when she called him shortly after his defeat. He later told reporters, “She called me to tell me how much she loves me.”

Representative Steny Hoyer, a longtime rival of Ms. Pelosi’s, now is freed from having to worry about Mr. Crowley in his ambition to be leader. But some House Democrats, speaking anonymously to discuss a delicate topic, said Tuesday night that given the party’s changing face, it would be difficult to dump Ms. Pelosi for an older, white male lawmaker.

In a flurry of phone calls and text messages, Democratic lawmakers floated names such as Cheri Bustos of Illinois, Linda Sanchez of California, Joseph Kennedy of Massachusetts and Seth Moulton of Massachusetts as potential younger alternatives to Ms. Pelosi. But Ms. Pelosi has made clear she intends to seek the post again if Democrats take back the House and it is not clear that any potential alternative candidate could build a coalition to defeat her.

As for Ms. Ocasio-Cortez, she had complained in recent weeks about media coverage that didn’t include her name but only that of the better-known man she was running against.

“Headlines from the Political Patriarchy,” she wrote on Twitter of one recent story.

Now, she is likely to be in headlines for years to come.