When the cryptocurrency exchange FTX was riding high, Sam Bankman-Fried, the company founder, communicated with the public in a relentless torrent of tweets, TV interviews and pronouncements in front of Congress.

Now as Mr. Bankman-Fried testifies at his fraud trial in Manhattan, those words have come back to haunt him.

On Monday, a federal prosecutor bombarded the disgraced crypto mogul with questions as he took the stand for a second day of testimony in federal court. Over four hours, Danielle Sassoon, the prosecutor, grilled Mr. Bankman-Fried about inconsistencies between his public statements and how he ran his crypto empire before it collapsed spectacularly in November.

Mr. Bankman-Fried, 31, wearing a light gray suit and purple tie, answered in curt “yeps” or “nos,” eschewing the sometimes-winding statements he gave at other points in the trial. Sometimes rocking back and forth in his chair, he insisted that he couldn’t remember much of what he had said publicly, including about FTX’s handling of customers deposits and the conflicts of interest that plagued his businesses.

“I’m not sure,” Mr. Bankman-Fried responded over and over, as Ms. Sassoon asked about statements he had made when he was chief executive of FTX. “I can’t recall,” he said at other points.

The cross-examination exposed cracks in Mr. Bankman-Fried’s claims, dealing a potentially serious blow to his credibility with the jury of nine women and three men who will decide his fate. On a large projector screen, Ms. Sassoon displayed statements that appeared to show Mr. Bankman-Fried saying one thing in public, then acting differently in private. After having him recount FTX’s outreach to government officials in Washington, Ms. Sassoon asked him to repeat private messages in which he used an expletive to dismiss regulators as useless.

Mr. Bankman-Fried’s testimony was the most anticipated moment of the trial, which has shined a spotlight on hubris and rampant risk-taking across the crypto industry. Once the face of crypto’s efforts to woo the public, Mr. Bankman-Fried is now widely compared to some of the most notorious fraudsters in recent history, including Elizabeth Holmes, the founder of the failed blood-testing start-up Theranos.

Taking the stand was risky. Criminal defendants usually avoid testifying so that prosecutors don’t have a chance to question them. But the first few weeks of the trial were so damaging for Mr. Bankman-Fried, as a procession of government witnesses testified that he lied to the public and stole from FTX customers, that he was left with few other options to salvage the case.

In December, federal prosecutors charged Mr. Bankman-Fried with orchestrating a sweeping scheme to steal as much as $10 billion from FTX’s customers. They said he had spent the money on extravagant projects, including venture capital investments, political contributions and luxury real estate purchases in the Bahamas, where FTX was based. Mr. Bankman-Fried was also accused of creating a secret back door in FTX’s code that allowed a hedge fund he founded, Alameda Research, to seize billions of dollars in customer funds.

He has pleaded not guilty to seven counts of fraud, conspiracy and money laundering, and could face what amounts to a life sentence if convicted.

Not long after FTX imploded, three of Mr. Bankman-Fried’s closest associates — Caroline Ellison, Nishad Singh and Gary Wang — pleaded guilty to fraud and agreed to cooperate with the government, hoping for lenient sentences. All three have testified against Mr. Bankman-Fried at the trial, telling the jury that they lied and stole for years at his behest.

Mr. Bankman-Fried took the stand on Friday to tell his side of the story. Under questioning from his own lawyer, he cast himself as a hardworking founder who was overwhelmed by his responsibilities and let major business issues go unaddressed. He denied that he had committed fraud, and blamed his colleagues for many of the problems that led to FTX’s collapse.

On Monday, it was the prosecution’s turn to ask questions. The courtroom was packed with spectators, including Mr. Bankman-Fried’s parents — the law professors Joe Bankman and Barbara Fried — and Damian Williams, the top federal prosecutor in New York. Ms. Sassoon’s mother also attended.

Ms. Sassoon focused many of her questions on Mr. Bankman-Fried’s comments in interviews, in congressional testimony and on Twitter. She pressed him on inconsistent statements he had made over the years about his famously unkempt hair, and pointed out his frequent use of private planes, suggesting that his ostensibly humble lifestyle was a public relations performance. The private flights cost a total of $15 million, Ms. Sassoon said.

She also grilled him about interviews he gave before FTX collapsed, in which he insisted that Alameda had no special privileges as a customer trading on the exchange. Over the first three weeks of the trial, the prosecution’s witnesses testified that the opposite had been true, and that Mr. Bankman-Fried had channeled billions of dollars to Alameda.

At one point, Ms. Sassoon walked to the witness stand and presented Mr. Bankman-Fried with a copy of “Number Go Up,” a new book about crypto by the Bloomberg News reporter Zeke Faux. She pointed to an interview in the book in which Mr. Bankman-Fried appeared to contradict his previous claims, acknowledging that Alameda had special privileges.

Ms. Sassoon asked if seeing the book refreshed Mr. Bankman-Fried’s memory of that acknowledgment. “No, it doesn’t,” he replied.

Eventually, Mr. Bankman-Fried, who is expected to return to the stand on Tuesday, made some concessions. He acknowledged that Alameda had a $65 billion line of credit with FTX, essentially allowing it to borrow unlimited funds. The second-largest credit line, which FTX had with another firm, was $150 million, he said.

But over and over, Mr. Bankman-Fried said he couldn’t remember various statements about Alameda and FTX that reporters had attributed to him. He didn’t read all the articles, he said, and he often objected to the reporting.

“I disagreed with basically every article written about me” after FTX collapsed, he said.

Mr. Bankman-Fried said he also couldn’t remember many of the key moments in the narrative that prosecutors had presented about the fall of FTX. He said he did not recall telling a former colleagues to transfer to Alameda some of the $2 billion that FTX had raised from venture capital firms. Prosecutors have charged that Mr. Bankman-Fried misappropriated money from FTX’s venture investors as well as its customers.

At one point, Ms. Sassoon asked Mr. Bankman-Fried whether he recalled making statements about the importance of safeguarding customer funds. He hemmed and hawed, eventually saying he couldn’t remember.

“I made a lot of public statements,” he said.

Then Ms. Sassoon showed the jury a tweet that Mr. Bankman-Fried had posted about that exact issue.

“And, as always, our users’ funds and safety come first,” he had written.