OK so you are on iOS 11.3.1 now and you want to reinstall iOS, reset to factory settings or just backup/restore?
Reinstall iOS: only if you know what to do with blobs and what a blob is. If not, it's not possible to keep iOS 11.3.1 now.
Reset to factory settings: just reset to factory on your device without iTunes in Settings > General > Reset > Erase all content and settings. This will keep current iOS version.
Restore a backup: Restoring a backup never affects iOS version. If this is the case, just backup/restore with iTunes or any other app.