I have the same issue and have tried a couple cords. I’m going to go thru every cord in my house today to be sure.I'd try a different cable or two until you find one that works. If possible, use the one that came with the iPhone. Even "apple certified" cables have problems with CarPlay.