Using a USB-C cable that delivers too much power to a device that requires less can also damage that device’s battery. Again, modern smartphones have built-in protections to prevent overcharging or charging too quickly, but cheaper, older smartphones or other devices that charge via USB-C may not.
In theory, if a charger provided more voltage than your phone’s battery or circuitry could handle, this would cause high temperatures, reduce battery longevity, and potentially cause serious problems. In reality, however, smartphones have several safety features to ensure this doesn’t happen. However, safety features can occasionally fail.
Yes cables matter, all cables will slow charge at upto 2.1A at 5v, but not all cables will do fast charging. MOST standard USB cables will do 18w usb PD or Qualcomm quick charge fast charging without a problem, but to go higher than that you'd need to use a higher quality and appropriately rated cable
In summary, using the wrong charger can damage your phone, and the best way to avoid this is to use the charger that came with your phone or buy a charger that is specifically designed for your phone. If you do not have a charger, you can use a standard USB cable to charge your phone.
If you use a fast charging capable adapter and phone, but your cable isn't capable of fast charging (one of the more common terms is USB-PD, usb power delivery). It aint gonna happen. The cable is responsible in a way for the handshake between the phone and charger to let them communicate like "Phone: Hey i can charge at x Watt?
If you use the wrong wattage charger to charge your phone, the device may not be able to receive the full amount of current that the charger can provide. This may result in the device’s battery not being able to be fully charged, or the device may overheat and/or catch on fire. Normal chargers are just fine to use with fast chargers.