Hallo @hana1005
Jestetten is included in the system of public transports in Switzerland. So a day pass for whole Switzerland also cover the part between Rafz and Jestetten and you can travel with the train S9 till Jestetten without buying an other ticket.
Jestetten is also included in the regional zone systems of Ostwind and Z-Pass Ostwind-ZVV. When you only travel from Zurich to Jestetten, than you have a zone ticket Z-Pass Ostwind-ZVV for the zones 110, 121, 112, 113, 114, 837, 820. This ticket also cover the part which is in Germany.
Kind regards,