There are two common possibilities.
One is that while the car is being driven, it is getting slightly charged by interactions with the air. The tires are not dissipating the charge. After you step to the ground you discharge through your shoes gently, but then touch the charged car and are shocked. If this is happening, you can get some discharge strips. They are fabric with woven metallic wires. They mount to the rear of the vehicle and touch the ground, giving a way for the car to discharge. I never used to see this, but have been told that certain modern tire formulations may make it more common.
The other likely case is that it's your clothing and the car's upholstery interacting. As you egress the vehicle, your pants drag across the seat. Depending on the materials, this can create a charge separation (just like rubbing glass rods with wool). When you then touch the car, you discharge.
Both cases can normally be mitigated if you can remember to grip a portion of the car (often a piece of the door latch mechanism on the post is convenient) before you try to get out. If you hold that piece as you emerge, there will be no shock.