Did it have a speedometer cable on it when you bought it? As far as I know, every XT225 from 1992-2007 uses the same cable. If the cable was missing, there is a good chance that someone just put the front wheel on without lining up the drive gear with the fork, and once you get it installed properly it will work fine.

This shows where the threaded part of the drive gear (part 15) should be pointing when lined up properly with the fork. Hopefully the drive gear is not broken, as it is an $80 part.

https://www.cheapcycleparts.com/oemparts/a/yam/500445dbf8700209bc78f866/front-wheel


The above is my opinion. Your mileage may vary.
1994/2001 custom built XT225 with a ton of aftermarket parts.