Fear not, for basic iPhone charging most USB-C cables will be fine. But some are finer than others. Macs use Thunderbolt cables that have the same Type-C connector as USB-C so look the same but ...
But for iPhone versions 5 to 14, Lightning is the port you need a cable for. If you still have a charger with a USB-A port, consider upgrading to a USB-C charger as iPhone fast-charging only works ...