If you have a genuine USB-C cable then by definition the cable must support at least 60W of power. This is plenty to charge a MacBook.
The temperature of the power adapter (or the cable itself) won't become a problem. The cable identifies itself to the charging device, so that the device "knows" whether the cable support 60W or an even higher wattage (such as 100W). Therefore there's no risk involved - the MacBook Pro won't try to draw 100W over a cable that only supports 60W.
Charging speeds could be affected depending on your actual MacBook Pro model. Some models come with a 61W charger (13" models), while others come with 87W chargers (15" models) or 96W chargers (16" models). If you've got a 60W cable and a 96W charger, charging will happen at a slower speed than if you had the ideal cable.
If your cable was made by Apple, you can identify the type of cable by looking at the printed text on it. You'll see that it says "Designed by Apple in California [...]" and then it lists a serial number. If that serial number begins with C4M or FL4, the cable supports 61W, whereas if it begins with DLC, CTC, FTL or G0J, then the cable supports up to 100W.