Speedos used to tap off the gearbox, gearing would turn a flexi shaft which would be translated at the clock into a moving pointer (clockers used to put a drill to this shaft to wind the clocks round to where they wanted them!)
I imagine modern speedos either use the same tech or count pulses from a magnet on a rotating shaft (similar to how a speedo on a bicycle works?), but not having pulled a modern speedo, I know not how they work.
A satnav has to take signals from at least 3 (?) sats to triangulate its position on the planet. As you move along, it re-triangulates its position, calculates the distance from the last point, how long it took to cover that distance & display this on the screen. These calculations are, of course, done extremely quickly. However, the faster you drive, the less accurate the speed reading.
This 'lag' is one of the reasons why many take wrong turnings.
On a roundabout, for example, your exit is ahead on the screen but you can be alongside it. If it says "take the third exit", best to count the exits rather than rely on the screen route to refresh.
The digital tacho on my bus always seems to correspond closely to the speedo on the dash. (maybe because both utilise the same method to record speed? - although the tacho doesn't have a driveshaft cable going into it)
If you were to change size of wheels and/or tyres, your speedo will no longer be accurate