How to create post comparison in wordpress

I am creating a feature in the child theme which is vehicles(car) comparison. the checkbox will add the vehicles(car) in the compare list from the car listing page. and compare page will give the compression of the selected vehicles(car). I want to create this flow, how can I create this. I have created vehicles custom post type.