Hello Voarreepe36
Welcome to the SBB Community.
Provided you have purchased the Swiss Travel Pass from SBB and you have purchased it with an user account, there is a free cancellation before the first day of validity.
If you have purchased it from SBB as a guest, you will pay CHF 10 per cancellation.
https://www.sbb.ch/en/help-and-contact/refunds-compensation/refunds-compensation/refund-form.html
If you have purchased it from another reseller (Klook, Rail Europe, etc), you have to request the refund with them.
Kind regards,
Roland