There are hundreds of cases, all different. Many involve software bugs but at least one does not. You can read about that one in the common issues judgement paragraph 217.
The SPMs were forced to sign and take responsibility for accounts that were prepared by the Horizon system, which claimed the SPMs owed the Post Office tens of thousands of pounds of imaginary money. If they later claimed that the accounts were wrong (which they were), they'd be prosecuted for signing them, and if they didn't do that they would be prosecuted for not paying the PO the money they supposedly owed. So they would lose either way, and the actual accuracy of the accounts was never tested in court, because in any individual case the PO did not disagree with the SPM about that.
The point being that this can't be blamed on software bugs alone. It was caused by different departments of the PO having completely contradictory ideas about how the software was supposed to work.
In fact very few of prosecutions relied on actual numbers. The problem was that Horizon handles both POS and accounting, and would shut down the entire store unless SPMs signed off on the accounts. Then if there was a dispute, the PO helpline would tell SPMs "just accept the accounts, we'll investigate later". The investigators would then decide it was fraud, but drop the fraud charge in return for a guilty plea to false accounting - which technically did happen when the SPM first accepted the disputed figures.
So none of the criminal trials ever got as far as actually looking at the disputed figures, because the defended would plead guilty or the PO would just lie about how the system worked to "prove" false accounting. As Justice Fraser wrote in the 2019 common issues judgement:
"This means that, even for disputed items going back as far as the year 2000, this litigation is the first time that there will be any independent consideration of disputed items showing in the branch accounts for the vast majority of the Claimants."
Indeed many of the disputes were not even caused by software errors but human error on the part of the SPM. Errors that they attempted to resolve but could not due to the way PO handled disputes.
So this is far more than just a code quality problem.