IPhone Not Resetting Back to Default

Recently, my IPhone has not been working as it should. It was giving out error message like "This IPhone does not support this software". This is just one of the error messages I have received, and the phone is completely not working right now.
For the safety, I tried to back up the data stored in my IPhone in case it has to be returned and restored later.
When I clicked on the button to restore the files, it started to do the restoration process; but after a while an error appeared on the screen saying, "The IPhone could not be restored. This device isn't eligible for the required build."
The iPhone Wesley Frantz's iPhone could not be
restored. This device isn't eligible for the requested
build."
I would appreciate any advice that can help resolve this problem.
I really do have to use it right now.
