Uninstalling the plugin does not erase Yoast SEO data from your database so you may safely remove and reinstall the plugin without losing any of your hard work. For the health and safety of your site, we recommend making a complete backup of your website, including the database file, before removing a plugin.