"No OS Installed" TWRP

Wait 5 sec.

It appears I've accidentally wiped the system partition through TWRP, and now when I try to install any GSI (from the list of supported GSIs), TWRP says that no OS is installed.I've also tried installing the original recovery.img after the GSI, as was written here, but didnt have any luck with that either.Is there a specific order of things i need to install to get the device working again?