It's not campaign spending, how can it be a violation?
It was considered an "in kind" contribution. Remember, this was part of the Mueller investigation. They were trying to find a crime to hang on Trump. They came up with the campaign finance violation, and Cohen pled guilty to it (no doubt under a lot of duress).
Cohen arranged (through the National Enquirer) to pay Daniels and McDougal for the rights to their stories. The payments were made and the NDA's were executed by the National Enquirer, who then resold the rights to Cohen (to reimburse the Enquirer).
The ostensible reason was to protect the reputation of Trump, so it was treated as a campaign contribution by the Mueller investigation in order to qualify as a "crime".
After the election was over, Trump reimbursed Cohen with the monthly payments that are the subject of Bragg's case.
Trump's campaign didn't pay Cohen, and never expensed the payments as campaign costs. The payments were made by the Trump Organization, and classified as legal expenses.
The NDA's were between the National Enquirer and Daniels and McDougal. Trump's name was not on them and he never signed them.
The rest of the charges against Cohen were for tax fraud and false statements to banks, on unrelated matters concerning taxi medallions and mortgages that Cohen was involved in.
So the entirety of Bragg's case is the way the payments to Cohen were recorded on the Trump Organization's books. Those are at the worst case misdemeanors, and only if they were made with intent to defraud someone...
All the rest of it is just hyperbole.