The efficacy of taking collagen specifically is very much in question. It seems to be about as effective (but much more expensive) than just increasing protein consumption.
There are things you can do, like apply heat and to an extent certain supplements can help (glucosamine and turmeric are the notable ones that have evidence to support them). That said the main thing that really helps is doing dedicated and systematic strength and mobily training for your ankle.
Probably that's a combination of placebo and the result of the fact that collagen is a protein supplement. You can most likely get the same result by using whey or other proteins for much lower cost.