Collisions on moving objects

When the car hits an obstacle the game should stop and when you dodge an object your score should go up with 1 but I have no idea how I can fix this…