The speedometer receives it's signal to display the proper speed from a speed sensor at the transmission. You will need to determine if it is a sensor issue, a wiring issue, an internal transmission issue, or a speedometer head issue. Lots to check here.
RepairPal Certified shops can diagnose and repair your 2002 Kia Rio. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.