Can USB-C cables be used on devices from different brands?

I'm wondering if I can use my husband's Samsung USB-C cable to charge my iPhone or if it is not advisable and I should strictly charge my phone with an Apple cable?

Can USB-C cables be used on devices from different brands?
Post Opinion