Muhammad, multiple times in the Quran, attacks positions which no one holds, though he presents them as the beliefs of others. This is called slander.
In both the Quran and Hadith, Muhammad slanders Jews, by teaching that they worship Ezra as the son of God:
Surah 9:30
30 The Jews say, “Ezra is the son of Allah,” while the Christians say, “The Messiah is the son of Allah.” Such are their baseless assertions, only parroting the words of earlier disbelievers. May Allah condemn them! How can they be deluded ˹from the truth˺?
Sahih Muslim 183a
Then the Jews would be summoned, and it would be said to them: What did you worship? They will say: We worshipped Ezra, son of Allah. It would be said to them: You tell a lie; Allah had never had a spouse or a son.
This is also narrated in Sahih al-Bukhari 4581.
In the above, Muhammad teaches that the Jews worshipped Ezra in a similar manner to how Christians worship Jesus. This is false. No Jewish sect has ever been found that worships Ezra, and if one was, that would be immaterial, because it's not representative of what 99.9% of Jews throughout history have done and believed.
Further, these are generalized statements. No attempt is made to qualify them, or give them scope. They are statements about the beliefs of "Jews". So, if Muhammad were to be speaking of a particular subset of Jews, he did so extremely unclearly and irresponsibly, thus refuting the Quran's own claim that it is perspicuous and easy to understand (Surah 6:114, 11:1, 15:1, etc.).
In the Quran, every time Muhammad mentions "three" in reference to God, here translated "Trinity", he then follows up by stating that there is only one God:
Surah 4:171
171 O People of the Book! Do not go to extremes regarding your faith; say nothing about Allah except the truth. The Messiah, Jesus, son of Mary, was no more than a messenger of Allah and the fulfilment of His Word through Mary and a spirit ˹created by a command˺ from Him. So believe in Allah and His messengers and do not say, “Trinity.” Stop!—for your own good. Allah is only One God. Glory be to Him! He is far above having a son! To Him belongs whatever is in the heavens and whatever is on the earth. And Allah is sufficient as a Trustee of Affairs.
Surah 5:73
73 Those who say, “Allah is one in a Trinity,” have certainly fallen into disbelief. There is only One God. If they do not stop saying this, those who disbelieve among them will be afflicted with a painful punishment.
So, what appears to be his argument? "Don't teach the Trinity, believe in one God." That's slander, and misrepresentation. The Trinity is "Tri-Une" - three in one. It teaches one God, not three. It's Monotheistic. It does not teach three Gods. So, why is he intimating that we are Polytheists? He doesn't understand our position, so he misrepresents it, and attacks a strawman misconception.
Then, in the single place in the Quran that seems to define the "three" that we believe in, we get the following:
Surah 5:116
116 And ˹on Judgment Day˺ Allah will say, “O Jesus, son of Mary! Did you ever ask the people to worship you and your mother as gods besides Allah?” He will answer, “Glory be to You! How could I ever say what I had no right to say? If I had said such a thing, you would have certainly known it. You know what is ˹hidden˺ within me, but I do not know what is within You. Indeed, You ˹alone˺ are the Knower of all unseen.
Jesus and His mother as God, besides God? That's a "Trinity" of Jesus, Mary, and the Father. That's slander. That's not the Christian view of the Trinity at all. That's a total misconception, and something that every single Christian would find blasphemous and false.
Earlier in the same chapter, he makes another statement which intimates that we believe that Mary is part of the Trinity:
Surah 5:75
75 The Messiah, son of Mary, was no more than a messenger. ˹Many˺ messengers had ˹come and˺ gone before him. His mother was a woman of truth. They both ate food. See how We make the signs clear to them, yet see how they are deluded ˹from the truth˺!
Here, he tries to debunk the notion that either could be God with the argument that "They both ate food". Not only is that a nonsensical argument - God could enter into His own creation, and eat something - but it also reinforces the fact that Muhammad genuinely seemed to believe that the Christian Trinity involved Mary.
So, why didn't "Allah" understand the Trinity? Even if it were false, surely he would be able to properly and honestly refute it, instead of refuting positions that no Christian holds - 3 Gods, one of which is Mary.
Slander is always wrong, even if you are slandering Satan (Jude 1:9). In the Quran, Muhammad attacks positions that aren't representative of the groups that he's connecting them to, which is misattribution - falsely ascribing beliefs to someone - a form of lying.
This is yet another piece of evidence that Muhammad had absolutely no idea what he was talking about, and no familiarity with the traditions which he claimed to be affirming (Surah 3:3-4, 5:43-48, 5:68, etc.). As a result, he had no choice but to misrepresent them, as he didn't even know enough about what they taught to attempt to mount a proper refutation.