If the credit card is the only account from that bank, you can delete the account. This will also delete all its historical info and transactions.
If you’d like to keep the card’s transaction history or if the card is connected to a bank with multiple cards or accounts, you can mark it as inactive or hide it.