Usually, you can simply restore your device from iTunes or MacOS to any latest available version, but you can also use the recovery firmware if necessary. You can get the iOS ipsw firmware files here if necessary. To use an IPSW file, you must be sure that you are using the correct version for a