I think the core of Cars movies is to see beyond your wants and desires:
Cars 1 - Lightning wants to be the first rookie to win a Piston Cup
Cars 3 - Lightning wants to prove to everyone he is a racer who can compete with the new race Cars, especially Storm
…to find something more meaningful and important that completely overtakes the initial self-centered wants:
Cars 1 - Lightning realizes the importance of friendship and community. This led him to give up being the first rookie to win a Piston Cup, so he could help Strip Weathers finish the race.
Cars 3 - Lightning realizes the importance of changing oneself and his role to pass on a legacy that has outgrown him. This led to him giving his racer position (95) to Cruz.
I think it’s a notable choice how both of these movies didn’t accomplish the initial motivation of Lightning Mcqueen. The story follows up on the character development Lightning went through rather than accomplish his selfish desire.
In the end, Lightning learns his lesson and it is reflected by his act of caring for someone else and help the other accomplish their goal. He helped Strip finish his final race. He helped and encouraged Cruz to start her first & second race.
The writing of Cars movies was really committed to send the message of reexamining your priorities, helping and giving chances to others!