Having a credit card can make it tempting to buy things when you don’t really have the money for them. This is a real problem.
The classic example is going on a shopping spree, spending a few thousand dollars and then not being able to pay it off in full for that statement period. Another example is relying on credit when you are not earning money, whether it’s because you’re between jobs, travelling or for some other reason.