Hello Quouzeahou40
The Swiss Travel Pass is valid from Tirano to Chur, also on the short section in Italy.
Between Lugano and Tirano, I see only trains with one change at Monza on sbb.ch, but check again the timetable short before departure. Last minute changes are always possible.

You need a ticket from Chiasso (border station) to Tirano. This is the same train until Monza, but the operator changes in Italy (Trenord instead of SBB).
Please note that tickets in Italy are valid only in the selected train. I suggest to buy them on Trenitalia.com or in Trenitalia mobile app with an account. You can choose another train before departure if you change your plan.
Kind regards
Danhiel