If CarPlay used to work properly and no longer does, replacing your USB cable will likely fix this. - If you're having trouble connecting to CarPlay try using a high-quality USB cable. Connects wirelessly via Bluetooth or wired via USB cable to Apple CarPlay.
eBay