Lost my OS during factory reset

If you have recovery-e instead if TWRP,
You can choose “apply update from SDcard”