> Of cuz, because of US are exceptional, US does not abide by the international law, so Pelosi visited Taiwan as a high level official from US.
One China Policy isn't a law, at least not outside the PRC; it's a gentlemen's agreement between the U.S., China (PRC), and Taiwan (ROC) which permits everybody to save face without having to go to war. It's not written down anywhere, except perhaps on a hurried memorandum.
Furthermore, the only reason the PRC represents China in the United Nations is because of another gentlemen's agreement between the PRC and the U.S. (Nixon, Kissinger) that the PRC would abstain from forcefully invading Taiwan. Up until then the ROC had the seat and would have continued to do so. (Note that this is distinct from the One China Policy, which is a face-saving public gloss on the commitments to abstain from using military force over Taiwan.)
But-for the strategic ambiguity wrt Taiwan, the U.S. is very careful not to violate Chinese territorial sovereignty. I'm not aware of any principal of international law that is per se violated by Pelosi visiting Taiwan. Perhaps the PRC has a law on the books that says otherwise, but the PRC doesn't administer Taiwan. This state affairs exists beyond written and normative international law; it just is what it is.
Now if the U.S. were to have a military presence on Taiwan, especially a permanent presence, then that would be another story. International law wouldn't figure into it either, but it would be a much clearer violation of the U.S.-PRC agreement regarding the PRC's ascension to the U.N. and the subsequent One China Policy memorandum. AFAIK, the U.S. doesn't permit military officers to enter Taiwan, at least not in their official capacity. Unlike the President, the Speaker of the House holds no military office. From the U.S. perspective, this is the no-go line.
If you want to talk about violating clearly written international agreements, let's talk Hong Kong. But that wouldn't be very productive, either, because despite the formalities the Hong Kong situation also pushes beyond the envelop of what normative international law can speak to.