That the credit for the theorem belongs to Cantor is not under question. This is acknolwedged in the article:>The revelation about Cantor’s result doesn’t undermine his legacy. He was still the first person to prove that there are more real numbers than whole ones, which is what ultimately opened up infinity to study.
What he is alleged to have plagiarised are the proofs, or at least one of the proofs. The original article by Goos [0] contains a lot more details about this, including a partial transcription of the letter by Dedekind that Cantor is accused of plagiarism. The story is complex.
1. Cantor's paper has two theorems: the countability of algebraic numbers and the uncountability of reals.
2. The proof of the former appears in Dedekind's letter, and Cantor acknowledges this in his response to the letter. Dedekind mentions in his letter that he only thought about proving this because of Cantor's prompt and only wrote it with the hope of helping Cantor. Dedekind felt that the proof by Cantor is "word for word" his, although it is quite the case. It is essentially the same proof though.
Cantor also felt that Dedekind's proof that the set of algebraic numbers is countable is essentially the same as his own proof of the countability of tuples. It remains that he didn't think of adapting that proof himself, and that Dedekind was the first to prove the theorem is not under question.
3. Dedekind was not the first to prove the uncountability of real numbers. However, he gave a number of ideas to Cantor in that same letter. Namely, he suggested proving the uncountability of the interval (0,1), and it seems that gave a pointer towards how to build the diagonalisation argument, although how this statement was useful to Cantor (page 76 of Goos' paper) escapes me.
EDIT: it's not a pointer to the diagonalisation argument, it is an argument why proving the theorem on (0,1) is enough.
4. Cantor proved the uncountability of reals shortly afterwards, and shared his proof with Dedekind. Dedekind simplified the proof in his reply, and Cantor seems to have come up with a similar simplification on his own. None of these letters are analysed in Goos' article.
5. Cantor published the two theorems; the first proof is essentially the same as Dedekin's, and the second proof is possibly the one Dedekind's simplified version of Cantor's. Dedekind is not acknowledged at all in that paper, due to academic politics.
Goos' paper is very detailed and quite readable. I recommend it. The site is pretty annoying and you can't download the article without creating an account, but you can read the article online.
Even if the most important theorem of the two is unquestionably creditable to Cantor, the first one should likewise unquestionably be credited to Dedekind, at least partially. This is where the accusation of plagiarism stems from.
Beyond the question on plagiarism, there is no question that Cantor and Dedekind worked together on this. The lack of acknowledgement by Cantor is certainly quite unfortunate.
[0] https://www.scribd.com/document/977967855/Phlogiston-33#page...