In general, a car is lighter than a truck, so it has less mass. This means that a car can accelerate faster than a truck, even if they have the same engine.
Additionally, cars are often designed with a lower center of gravity than trucks. This makes them less likely to tip over when they accelerate quickly.
Finally, cars usually have a better power-to-weight ratio than trucks. This means that they have more power for their weight, which allows them to accelerate faster.