Sounds like a sensor
Your rpm and odometer sensor were probably busted.
You are not moving!
The speedometer.
it's asleep
speedometer
you're not moving?
Broken speedometer cable.
Your speedometer is broken.
Assuming this happens while you are moving you probably need to replace the speedometer cable.
A speedometer shows how fast a vehicle is moving in either miles or Kilometers per hour. They used tp use a spinning magnet driven by a cable off of the transmission. A metal cup covered the magnet and was turned by it. A spring keeps it from turning completely and the cup is fastened to a needle which indicates the speed. Now cars use a sensor at the transmission which provides an electrical signal that drives the speedometer, odometer, cruise control, and the car's computer systems.
speedometer
Because the car is not moving