How to Turn off CarPlay
No real mean to turn off CarPlay, you'll have to 'CarPlay unpair' it.
However then you'll get a dialog asking each time you connect it to your car (at least on USB) to start CarPlay, quite annoying if at last you do not want to use it.
One workaround, if you just want to charge or do not want CarPlay at all, is to disable CarPlay on lock Screen.
That way CarPlay will not be launch if the iPhone is locked.
As this is a car by car setting in CarPlay menu you can choose somehow to use CarPlay on some car and not on some other car.
Depending on Car Maker implementation, you still might have a popup on the Car Screen asking to unlock the phone to star CarPlay that you'll have to dismiss.
Not perfect a solution, wondering why Apple did not put a setting to disable Carplay Globally or probably better by Car as for the CarPlay on lock screen.