The 12 jurors who will decide the guilt or innocence of Donald J. Trump in the first criminal trial of an American president could be deliberating his fate next week after a few days off.

On Monday, prosecutors rested their case after their 20th and final witness, Michael D. Cohen, stepped down from the stand after a week of testimony in a Manhattan courtroom. At the end of the day, defense lawyers told the judge that they could finish early on Tuesday after the conclusion of testimony from Robert J. Costello, whom they called to the stand. That’s an indication that it is unlikely Mr. Trump will testify.

The judge, Juan M. Merchan, said that closing arguments would come next, after the long Memorial Day weekend.

Mr. Trump’s trial entered its sixth week on Monday, with signs throughout the day that the patience of some in the courtroom, including the judge, had worn thin. Near the end of the day, Justice Merchan sharply scolded Mr. Costello over his behavior on the stand.

Mr. Costello had been expected to attack the credibility of Mr. Cohen, Mr. Trump’s former fixer, but attention quickly shifted to Mr. Costello himself. That shift started after prosecutors objected to a question asked of him, and Mr. Costello protested the situation under his breath.

Justice Merchan rebuked him: “If you don’t like my ruling, you don’t say ‘jeez,’ and you don’t say ‘strike it’ because I’m the only one who can strike testimony in court.”