How to enable CarPlay on your iPhone if it is restricted(or can not be detected)
If your iPhone isn't detected by CarPlay, make sure CarPlay isn't restricted. Go to Settings-Screen Time-Content & Privacy Restrictions. If Content & Privacy Restrictions is turned on, tap Allowed Apps and make sure CarPlay is enabled