iPhone 5: How to upgrade from 7.0.4 to iOS 9 and above?
iPhone 5 can run iOS 10.x

You may need to do iOS upgrades in sequence, but I can't find definitive info on this.

You might want to use iTunes on Mac or PC to update your phone to keep settings intact.