The Dunning-Kruger effect is something you have to be very careful with. It's come out of social science, so, you have to keep up a high level of skepticism.
The first problem is the "effect" can be discovered in purely random data, because it's basically just a statistical artefact. There's a description of what went wrong here [1] and a paper from 2017 here [2] ("Our data show that peoples' self-assessments of competence, in general, reflect a genuine competence that they can demonstrate. That finding contradicts the current consensus about the nature of self-assessment"). In other words it doesn't replicate when the data is handled correctly. By itself that problem means DK should not really be cited for anything.
But even if you ignore that:
• The original study does the usual pop psychology thing of extrapolating from a tiny self-selecting sample of American college students to all of humanity.
• It has a stupid design in which the students are asked to rate how funny jokes are, with some local comedians being the "experts", and this is presented as a measure of social skills i.e. simple disagreement on what's funny is sufficient to get you dinged as incompetent-but-doesn't-know-it in DK's research.
• It also has a problem with circular logic where they found that one of their hand-picked joke experts disagreed with the others on what's funny, meaning that comedian would have been considered one of those idiots who thinks they're an expert, but they were picked by Dunning & Kruger specifically because they were an expert. This shows that the nature of many tasks is subjective and certainly the one they'd chosen is subjective, but instead of fixing their definition of expertise they just tossed the guy out of the expert pool.
(the study does have two other tasks, but there's not enough detail in the descriptions to know if they had similar problems)
Dunning wrote an attempted rebuttal in 2022 [3], but it is unable to directly attack the statistical claims and instead argues that because there have been replications, the effect is real. But this doesn't make sense because if you replicate an invalid methodology you'll get the same results; this doesn't make them correct. He also argues for it by presenting examples of "skills" that are simply brain teasers/well known gotchas, rather than actual skills one might practice.
[1] https://fortune.com/2023/05/08/what-is-dunning-kruger-effect...
[2] https://digitalcommons.usf.edu/numeracy/vol10/iss1/art4/
[3] https://www.bps.org.uk/psychologist/dunning-kruger-effect-an...