try this first. plug one end of the Apple USB-C into the vehicles USB port, start the vehicle, wait for the infotainment screen to finish doing its startup (about a minute) than plug the USB-C into the iPhone. My GM system makes a short jiggle noise and the carplay then shows on the screen. The USB-C cable has current and connection detection chips in them. This could be the major reason why sometimes it works and sometime it doesn't.
Caution, USB-C cables are not all the same because the C refers to the connector's physical shape, pin count and it being symmetrical (can be plugged in either end and/or be rotated). USB-C cables can have different uses. The standard spec USB-C that meets the USB-IF standard and the one Apple sends with the iPhone 15 has a data transfer rate similar to USB-3 about 5 or 10 Gpbs (type 2 has 5 wires called hi-Speed and type 3.1 has 15 wires called Superspeed) and carries 5 Volt power at either 3.0 or 5.0 amps (15W and 25W). This spec is for a one meter aka 3 foot cable so longer ones will have lower data capability.
Special device supplied USB-C cables can also have higher power included to run hard drives, fast charging and carry HDMI signals. So that said when using a C it has to be designed for a specific use such as data transfer and wattage at a minimum. When buying a new one that is not an Apple part make sure it meets the USB-IF standard. They also contain a chip to allow it to work with different devices such as hard drives and video. There are many versions that have various wattage and data transfer capabilities.
https://web.archive.org/web/20161220102924/http://www.usb.org/developers/presentations/USB_DevDays_Hong_Kong_2016_-_USB_Type-C.pdf