As I recall it was over the prosecutor making statements implying guilt due to Rittenhouse not talking to police after he was taken into custody or something to that effect. Whatever the specifics, it was over violation of a person's fifth amendment rights. Judges try to make sure that juries understand the importance of this, because there is a very natural inclination to believe that not testifying in your own defense or refusing to speak with law enforcement must be some clear sign of guilt. The prosecutor implying guilt over it is an affront to justice.
The judge reamed out the prosecutor over it and I think he still could have used it as an excuse to toss the verdict if it did come back guilty. It almost certainly would be used as a point of appeal and for a new trial. There was also some speculation that the prosecutor was doing it intentionally to get a mistrial since things were going poorly for them by that point in the case. Whether the judge saw it that way or not, I don't know. I think it was probably mooted in the mind of the jury since Rittenhouse did eventually take the stand.
In the end, it was the right call from the judge to keep the trial going. Dismissing the trial on a procedural ruling, especially before any verdict came in would not have allowed Rittenhouse the not guilty verdict that he deserved.