2006 ford f 150 speedometer jumping

I have a 2006 ford f 150 . the speedometer is not working in the morning and then is fine in the afternoon. It only jumps up and down when I reach over 40 mph ( found this out by my gps). what could be the problem??

could just be the speedometer gauge it doesn’t have a cable I’d see if that gauge itself is bad.

The problem is likely the Vehicle Speed Sensor which is usually to the back of the transmission.