Depends on type
Some ankle fractures require surgery and some can be treated by immobilization.
Factors that guide the treatment opinion of your doctor include: location, type of fracture
(some are more stable and others very unstable), injury force, whether the fracture is open or closed, personal medical history and health, and many more. Talk to your doctor to understand the plan.