Hi Quoiberau97
I suggest to change in Lugano and take a regional train from Lugano to Milan (RE 80). You can buy an Arcobaleno Transfrontaliera return ticket from Chiasso to Milan, it is valid in every train during the day of validity only in regional trains. Such tickets are available on sbb.ch, in SBB Mobile app or on vending machines. You can buy it only on the day of departure. In Milan, you have to ask the staff to access the platform, such tickets cannot be scanned at this station.
Kind regards
Danhiel