Stock tires an rims? Change the circumference of the tire and that changes the odometer reading and the speedometer reading.
The odometer is a geared linkage. If the tire and wheel is stock, it should be pretty close.
The speedometer is a magnetic coupling. Magnets do change their strength over time. Which usually makes them read lower than actual. However, the magnets spin around a bell. If the bearings are worn and the magnets get closer they can increase the needle deflection. They can also drag a bit on the bell, but that is usually VERY noticeable. Lastly the needle mechanism has a spring return. If the spring "relaxes" from metal fatigue of constantly bending, it is easier for the needle to deflect by the magnet's pull.
Used to be that cops had calibrated speedometers. They had to be checked/ tweaked periodically to keep them accurate. If you got a ticket for speeding, you could ask the cop to see the calibration card. If it was out of date, the ticket would get thrown out of court.
Cheers,