I had an iPhone Xs that worked flawlessly with CarPlay when wired to my 2021 Toyota Highlander. Bought an iPhone 13 mini and it wouldn't work using the same Apple iPhone Xs cable (USB 2.0 to lightning). Tried all of the popular solutions (e.g. turning EQ off, resetting all settings, repairing the device, etc.). Then tried using the Apple-provided iPhone 13 mini USB-C cable with a USB A to USB-C adaptor...worked for exactly one drive. After that, no luck.
Next, I used a third-party USB 3.0 to lightning cable and it worked. Tried it again 4 hours later, same cable, same phone, same car...didn't work. Then I tried the exact same cable again this morning (because I became obsessed with trying to fix it) and it worked again and seems to be working. Couldn't tell you why.
From my research, it seems that different people are getting different results even when using the exact same phones and cables. I guess it depends on the car as well. Some people say the Anker cables work with iPhone 13 and CarPlay, others say they don't. For me, a cheap Amazonbasics cable did the trick (for now).
Just thought I'd post my experiences here if it can help someone the nuisance of having to reset settings (and having to reload Apple Pay cards), etc. Just try different cables before doing something more time consuming.