Of course a natural reaction is to say that the Uyghurs have a legitimate cause, and the 911 attackers didn't. However, the official US theory of the motives behind the 911 attacks is "they hated us for our freedom". [2] According to this theory (as I understand it), the terrorists saw how free Americans were, saw how unfree they themselves were, became jealous, and attacked us. Now, there is no doubt that IF this theory is true, then the attackers indeed had no legitimate cause. But the theory (as I trust you will agree) is hardly believable, as it simply does not accord with our ordinary conception of how the human mind works. A more plausible theory of the motives is needed in order to make any assessment of whether the terrorists had a legitimate cause.
[1] https://www.democracynow.org/2019/11/15/headlines/analysis_f...
[2] https://en.m.wikipedia.org/wiki/Motives_for_the_September_11...