It seems there are several on line options for basic "express" ticket:
TicketOne, or
an archaeological website https://pompeiiarchaeologicalpark.com
What does Rick Steves recommend?
Personally I would not buy a ticket in advance since Pompeii is completely open with no protection from the weather. I would buy when I get there and it is not raining.