She pointed to comments made on Friday by Lt. Gen. Jeffrey Buchanan, who is leading the response effort and who said on Friday that he did not have enough troops and equipment. “So who am I?” Ms. Cruz asked. “I’m just a little mayor from the capital city of San Juan. This is a three-star general telling the world that right now he does not have the appropriate means and tools to take care of the situation.”

The attacks on the mayor generated a backlash from celebrities and others who noted that the president was spending the weekend in the comfort of his golf club while the mayor was struggling to help her constituents on an island with no power. “She has been working 24/7,” Lin-Manuel Miranda, the creator of “Hamilton,” the hit Broadway musical, wrote on Twitter. “You have been GOLFING. You’re going straight to hell. Fastest golf cart you ever took.”

Lady Gaga, who has twice as many Twitter followers as the president, said that “it’s clear where the ‘poor leadership’ lies @realDonaldTrump” and added that he was “not helping PR because of the electoral votes u need to be re-elected.” As an American territory, Puerto Rico does not have votes in the Electoral College, which determines the presidency every four years.

Russel L. Honoré, the retired lieutenant general who took over the response to Hurricane Katrina in 2005 after an initially inadequate federal effort, also noted the president’s weekend retreat. “The mayor’s living on a cot, and I hope the president has a good day at golf,” he said on CNN.

The president was out of sight on Saturday, secluded at his club in Bedminster, N.J., miles away from the pool of journalists who follow him. Aides would not say whether he went golfing, although they said he had telephone calls scheduled with Puerto Rico’s governor and the head of the Federal Emergency Management Agency.

Ms. Cruz became a powerful voice of grievance on Friday when she went on television to plead for help and reject assertions by the Trump administration about how well it was responding. She was incensed by comments made by Elaine Duke, the acting secretary of Homeland Security, who had said on Thursday that it was “really a good news story in terms of our ability to reach people and the limited number of deaths” from the hurricane.