It can be due to the ligament injury in your ankle joint. Which leads to pain and swelling along with inability to walk properly.
Next Steps
Go to a physiotherapist.. Ultrasonic therapy +wax therapy +some strengthening exercises will be helpful for sure.
Health Tips
At home.. Rest +hot water fomentation +pain killer gel +use crepe bandage or ankle support strap+keep the foot elevated+frequent ankle-toe movements