Hello Vimeaghoiqu40
In case of a misconnection which is the result of a railway fault (e.g. previous train delayed), you are welcome to use the next train. If you were wandering around and therefore missed the train, then you would have to purchase a new ticket.
If the train is late by more than 5 minutes, I recommend staying on board the train and continuing to Zurich HB. Change there to a train bound for Lucerne. In Thalwil, the train to Lucerne stops once per hour, while there are actually two trains from Zurich per hour, one which is non-stop to Zug, thus no stop at Thalwil. You might be able to catch this one then.
We remain at your disposal even while you travel here in Switzerland. Simply get back to us if you need instant advice. Or, ask the train staff, we all do speak English to a certain extent.
Kind regards,
Roland