Likely there is a blockage in the line somewhere. These analog units are all pretty bad about getting trash in through the water pick up. I don't 'think I've every had one that work well without a lot of attention and cleaning out. I've quit trying to keep mine operating properly - I just use a GPS unit now. Most of the analog units aren't very accurate anyway. I would have replaced the unit on my Z-18, with a GPS unit but the fuel gauge is combined into the lower section of the unit. If that's not true on your boat you can get an electronic unit that gives you speed and mileage very accurately through the GPS. There are some that are the same size hole in your dash.
On the leading edge of your motor there is a small hole. It is called a pitot and it uses water pressure to make the speedometer work. I uses a small drill bit to clean mine out. Do not use it in a drill, just by hand. Usually they get blocked by bits of wood.