Explanation
He shows great ability in Mathematics.
Sara shows great ability in Physics.
We use "in" in the phrase "ability in Physics" because "in" is the correct preposition
"Ability in" + subject/field
"In" indicates the area where the ability exists.