Jurisdiction: england-and-wales
Section 2(1) of the Defamation Act 2013 provides:
It is a defence to an action for defamation for the defendant to show
that the imputation conveyed by the statement complained of is
substantially true.
If a newspaper prints that a person has been accused of a crime and that person has in fact been accused of a crime, then the statement is truthful and there is no defamation.
It would be different if the newspaper printed that the person had committed the crime (which implies they have been found guilty). If you pay close attention to such news articles you will see that they are usually very careful to use words such as "alleged", "accused", "is on trial for" etc.
See the case of Christoper Jefferies for an example of a person who was accused of a murder, but subsequently found innocent, and who successfully sued various newspapers for defamation. In that case the articles had gone beyond mere statements of fact:
He cited several examples of headlines and stories that had been
published, including a headline in The Sun describing Jefferies – a
former schoolmaster at Clifton College – as weird, posh, lewd and
creepy; a story from the Daily Express quoting unnamed former pupils
referring to him as "... a sort of Nutty Professor" who made them feel
"creeped out" by his "strange" behaviour; and an article from the
Daily Telegraph, which reported Jefferies "has been described by
pupils at Clifton College ... as a fan of dark and violent avant-garde
films". Jefferies launched legal action against six newspapers on
21 April – The Sun, the Daily Mirror, the Daily Star, the Daily
Express, the Daily Mail and the Daily Record – seeking damages for
libel. It was held that the media were quick to jump to
conclusions regarding Jefferies's arrest. Being a retired English
teacher who lived alone, whose physical appearance and "eccentrically
unkempt white hair," made him stand out, led people to believe that he
looked the type. Stephen Moss wrote in The Guardian: "The
unspoken assumption was that no one could look that odd and be
innocent."