If you have to have a credit card, make sure you get one with the lowest interest rate possible; no annual fees and with only enough of a credit limit to get you by in an emergency.
Don’t carry it with you, but instead keep it in a safe place known only to you.