Hello ShangKexin
I recommend that you delete the old card first. You can delete the means of payment in the step menu settings under '‘means of payment’' (move the means of payment to be deleted from right to left and delete). And only then to register the new card.
Alternatively, you can re-register your credit card at www.sbb.ch Log in and click on your initials in the upper right corner. Then select “User account” and enter the new credit card under “Means of payment”. Finally, you can log in again on the App and the purchase should work.
If this does not work please contact our online/mobile support directly so that my colleagues can control the case with you.
Call +41 848 44 66 88 or send an e-mail to ticketshop@sbb.ch.
Kind regards
ManuelaPf