In Server Manager, all sites are preserved on the server even after the software has been uninstalled.
There is a Keep Sites During Uninstall option enabled by default, which keeps all your sites, including their application pools and virtual directories, as maintained on the server.
If the software is reinstalled, the sites are available to be restored and updated in Server Manager.