I last went to Zermatt in 2018 but for many years always did a Swiss Transfer ticket from ZRH-Zermatt-ZRH. I don't see this option anymore?!? Is there a different way to do this now and if so, is it still the same - just buy in advance before you get to Switzerland and get on whatever train you want on the outbound and return days?
The Transfer Ticket was discontinued, but have a look at the Saver Day Pass. Beginning 60 days before your travel date, they go on sale for 52 CHF. That allows unlimited travel in the GA area (trains covered fully by a Swiss Travel Pass) for a day. Price goes up over time.
https://www.sbb.ch/en/travelcards-and-tickets/tickets-for-switzerland/1-day-travelpass/saver-day-pass.html