Hello Stella012
Good day…
No, you have to get a ticket from Como to Chiasso and ask the SBB personnel on board to stamp the ticket. Or, you stamp it at Chiasso station during the train’s stopover. The stamp machines are located on the platform, near the stairs.
Kind regards.
Roland