Pain on the inside or outside of the ankle? I dealt with a lot of ankle tendinitis at one point a long while ago (as a freshmen in HS), it must've slightly altered my gate. I started to get pain on and below the medial malleolus. Basically it felt like a constant, ringing pain that was amplified by running. Diagnosed as a stress fx of the talus (and oddly enough, first doc I went to said it was very unlikely to get SFx there, pushed for imaging and got it diagnosed properly the second time). I was in a boot and on crutches for 6wks, could only do pool running and upper body lifting, no biking or swimming (I didn't know how to swim at the time so it was probably an option, I just couldn't have done it). Healed up perfectly and I came back even better than before.
Had a stress reaction in the opposite tibia the following year that ultimately developed into a stress fracture (I ran through it bc I didn't want to miss my XC season). Caused a ton of issues for years afterwards, probably a bit of permanent damage in that area, and limited my running for years (this is when I learned to swim and became a triathlete, oddly).
also good article
https://enrgifitness.com/reasons-for-fitness-failures/
Sfx often don't appear on x-rays, I think only 70% (?) do. You need an ultrasound, bone scan, or MRI. Don't run on it, you will pay for it later. By the simplest rule of thumb (if it gets better once you're warmed up, it's tendinitis, if it gets worse, it's probably stress reaction/fx), you shouldn't be running on it.