These are usually sealed units and for the most part are not repairable. You might get another one from a junk yard ... or try searching the internet.
The other possibility is that the physical cable that drives a mechanical speedo could be broken. Some of these are driven off the transmission, others are driven off one of the front wheels.
you can go to speedometer and out of speedometer
If the speedometer breaks, it effects the odometer. Check the speedometer cable it may be broken, even under the insulation.
If the odometer stopped working and the speedometer and cruise control still work, you have a bad odometer. It is part of the speedometer assembly so the whole thing will have to be replaced.
If it's an analog speedometer, first check the condition of the speedometer cable. It may need to be replaced.
check the fuse, the speedometer does not run off of a fuse
the speedometer on my 97 toyota camary stopped working and the check engine light came on why
If both the speedometer and odometer stopped working it is probably the speed sensor in the transmission gone bad. If only the speedometer quit you may have to replace the dash cluster with a reconditioned unit.
The speedometer and odometer may stop working in a Nissan Pathfinder due to an electrical short. It may also need a new spark plug.
The gauge has failed.
If your odometer/speedometer stopped working, then you must replace the "vehicle speed sensor" located on top of the differential if your have a manual transmission.
If the odometer has failed, does the speedometer still work? They are both driven by a cable which spins. If the speedometer is still working, than the odometer has jammed. Probably a dealer fix.
Is this a statement or a question