I saw two rather incorrect takes in the notes, so I'ma clarify again with examples.
Malice is, specifically, the desire to cause harm/suffering as an end. It is evil for evil's sake. Generally, it is done to others. (Not getting into self-harm here.)
Stupidity is foolishness for which you are morally culpable.
I provided two forms above, so I'll explain with examples. These are going to be ones without much moral weight because they illustrate the point, aren't controversial, and are something that came up in my job.
In English, the word "have" is contracted as "'ve" (an apostrophe and the letters V and E) in writing and represents a sound very similar to how, in US English, the word "of" would be said. "Might've" contracts "might have" and not "might of." It is not controversial that "might've" is the form to use and "might of" is not because the "have" is a marker of the past tense and "might of" means nothing when "might" is a modal verb. In the US education system, contractions are (or at least were) taught in elementary school. My recollection is that it was in the 2nd grade, but it could have been as late as the 4th.
Not knowing this, blanketly, is ignorance.
If you did not know this because you are not old enough to have encountered the grammatical lesson or else have not attended such a school or don't speak English, it is simple ignorance. It is not a moral failing.
If you are incapable of learning this, that is not a moral failing, either. This applies to degrees of incapability, such as learning disabilities.
If you got through school but somehow never learned this, it is ignorance. It may or may not be a moral failing: you reasonably should have learned this in the course of your education (at the very least from reading anything) and should know to look things up when confronted with something unfamiliar, but if you made it through the education system and didn't learn something that basic, clearly the education system failed you.
But, as a hypothetical, let's say your education was fine, you had the opportunity to learn this grammatical and punctuation rule, and you didn't. Reasonably, you should know it. The fact that you don't is a failing on your part. That ignorance is stupidity. It's not intentional, but you have failed to recognize a fault which you reasonably should have recognized and a lack of intention can be a moral failing.
(A more controversial example to help illustrate this better: you may not want to cause injury to another, but you have no intention to prevent it in a circumstance you control and reasonably could take action to prevent injury. Carelessness is a form of stupidity.)
Finally, there's intentional stupidity.
Suppose you are in a job involving written language where it is INCREDIBLY IMPORTANT that your writing both is a verbatim transcription of what is being said (which may itself be ungrammatical) and otherwise (whenever possible) conforms to standards of spelling, punctuation, and grammar so that someone reading it can understand what was being said without issues of ambiguity beyond the speakers' word choices. Your final product has to meet such standards or you may get in trouble and even lose your job.
(This is the standard for court reporters because legal proceedings may hinge on differences in what was said. Other captioners and transcribers may have similar levels of exactitude for a number of reasons.)
You have a habit of writing the contracted form of "might have" as "might of" because that sounds to your ear to be verbatim.
You occasionally send your writing to a proofreader. The proofreader has corrected the mistake numerous times and has told you that it is never "might of" unless someone is trying to discuss that as an example. You have no personal attachment whatsoever to this proofreader and could easily get another one. You have no desire to harm the proofreader in any way. Indeed, the fact that you're paying the proofreader to proofread suggests otherwise. Writing "might of" does not cause more than mild annoyance to the proofreader and mostly requires them to type another correction which you will have to implement later. The consensus on the issue is easily found. You have the means to bypass typing out "might of," "might've," and "might have" via shortcuts you can program yourself.
You still type "might of."
It could be a bad habit that you have taken steps to correct but haven't fully corrected. Or it could be that you still do it consistently. Or it could be something else. There's wiggle room in here for degrees.
But the ineptitude is now a result of your ego. You don't like that you're wrong and refuse to change, you disbelieve that you might be wrong and refuse to seek out a second opinion, or you're not being conscientious enough to make sure you don't make the same mistake again because that would mean admitting you're wrong and force you to police yourself.
That's intentional stupidity.
Like I said, the stakes in these examples are quite low. But the stakes in stupidity don't have to be low. Nor is stupidity always segregated from other issues, malice included.