My speedometer works fine thospeed sensor in your wheel hub most likely went bad.
according to my mechanic every wheel has a speed sensor it is used for abs etc. that’s what has failed not the sensor for the speedometer to report traveling speed. I have had the same and it was the wheel bearing hub going bad.My speedometer works fine tho