A few things:
1) It depends on what charging cable you are talking about. If you're talking about an iPhone Lightning cable, then it's very important to get the right Made for iPhone/iPad/iPod cable.
2) If it's not Made For iPhone, then don't buy it. The knockoffs don't have the proper chip and may be poorly designed. They often don't work properly, but even if they do, they are usually poorly constructed.
3) If you get a Made For iPhone cable, you can get them from Amazon or Monoprice, but you have to pay attention to the details to make sure you get a legit one.
4) Although the Amazon or Monoprice Made For iPhone cables work fine, and generally are decently constructed, their collar dimensions are different. This is not a problem for a bare iPhone, but it's a problem sometimes if you have the iPhone in a case. The OEM Apple iPhone Lightning cable has a very small collar. Therefore, many case makers make their cases with only a small hole to fit the Apple cable. If you buy a third party cable with a bigger collar, it may not fit through that hole in the case. It gets real old fast having to remove your iPhone case just to charge the iPhone.
For example, look at this Amazon Basics Lightning cable's collar compared to the OEM Apple one: