Motor Shield or Sensor Shield ?

Hello guys, I recently bought a 2 WD car kit to make an obstacle avoiding robot. The kit comes with a motor and a sensor shield, as you can see in the pictures I attached here.


I've been searching around and found out that some people use either one or another but never both of them at the same time. I was hoping if someone could explain to me which one I should use and why.

Thanks everybody

looks like the sensor shield cant give you the power to the motors that youll need... so I would choose the other, for now. you can perhaps add in the sensor shield later if you must or so desire

And using the motor shield, I can use the servo motor and the Ultrasonic sensor, right?

The motor shield apparently uses 4 pins, an ultrasonic sensor presumably 5 at most , so 9 total is worst-case.