You've got a few things to take into account...
Sora is a Shimano road bike groupset, so a direct replacement would be another Shimano road bike derailleur like Sora, Claris, Tiagra, or 105. (Not 11-speed, though.) Shimano mountain bike derailleurs were compatible up through 9-speed, so you could use one of those.
You'll need to make sure the derailleur cage (length between pulleys) is long enough to handle your gear ratios. Each model typically comes in multiple versions -- e.g. short cage, medium cage, or long cage.
The derailleur may or may not be bent -- we really can't tell without pics. But if the derailleur got hit/pulled/snagged hard enough to bend it, there's a really good chance the derailleur hanger got bent, too. The hanger is the tab on the frame the derailleur screws into, and it needs to be aligned properly in order for shifting to work well. There's a shop tool specifically for checking and setting hanger alignment.