Paper rejected based on one very short wrong comment
Wait. The editor has to assess if your claim is correct. People are busy. In addition, they may need to ask a more expert colleague for a quick opinion; this is not a full round of review, but still it will take several days. I would give them at least two weeks, personally (but publication times are heavily discipline-dependent).
If the editor agrees with the reviewer, consider seriously the possibility that they are correct and you are wrong. Ask privately for another opinion to a collaborator/colleague you are in good terms with, just to understand where the truth lies.
If you conclude that the referee is completely bonkers and their claim is ridiculously wrong, ignore their remark, submit somewhere else, and make a note for the future that this is not a good journal.
If you conclude that the referee is wrong, but their one is a reasonable mis-interpretation and someone else may get it wrong, too, then revise your introduction: mention mr. X's papers and explain in your manuscript why they don't solve your problem. Then, submit somewhere else.


(Note that case 4 is much more common than case 3.)