Your speed sensor has failed. The vehicles speedometer is not cable controled, it's controled by a sensor in your transmission. It's a easy fix, but the new sensor is about $80 to $100 depending on where you get it.
Most likely a speed sensor is going bad (most cars and truck do not use mechanical speedometer cables anymore) most sensors are located near the differential in rwd cars or near the drive shaft on the transmission. Best bet is to get a Haynes manual for your car to help locate the speed sensor. Remove it and take it to the auto parts store so you can visually compare it to the replacement. Install the new speed sensor and it should restore your speedometer and odometer.
these can also be caused by a bad alternator
Check the vehicle speed sensor in the transmission.
take it to your nearest dealership this is not a problem you can fix on your own also if you try to resale this car that will become an issue on the milage due to that issue