If I remember correctly the gearbox end of the speedo cable has a squared female end that matches up with a squared shaft on the speedo drive pinion.
You can remove that part of the mechanism from the gearbox without much problem just by undoing the brass nut. The speedo drive pinion and its little shaft will come out. You should then be able to see whether the square shaft is capable of driving the inner cable. Often there is wear which rounds off the corners and allows it to slip. You can also check on the state of the drive pinion which can also wear. Replacement is a reverse of removal. The speedo drive worm is a press fit onto the end of the 3rd motion shaft and accessible after removal of the prop-shaft flange and rear cover if you're going further down that road.
Location: Gard, France 30960. Used to be Languedoc-Roussillon but now it's Occitanie