Security - the more inactive themes you have installed on your site means the more opportunities and access points you provide for a hacker to penetrate your site.
Performance/Updates - it's the WordPress admin dashboard, the backend of your WordPress site, that's most severely affected by inactive themes, mainly due to updates. If a theme is deleted, than there is no need to keep it updated, cutting down maintenance times/outage periods.
Space - every inactive theme on your site is taking up valuable disk space, slowing down your website and increasing the size of your backups.
Database performance - inactive themes add data to your WordPress database. Just useless tables and fields of data affecting the performance of your WordPress database and making your site sluggish. Not good.
Before you delete themes or anything related to the backend/functioning of your site, take a manual backup first, just as you would before updating plugins, WordPress, etc.
Select Appearance ⇾⇾ Themes.
The first theme shown in the Themes window is the Active theme. All others are inactive. Move your mouse over one of the inactive themes until you see a Theme Details box. Left-click the box.
At the selected inactive theme’s details window, click the Delete button in the lower-right-hand corner.
Click OK when prompted to confirm the deletion.
Do this with all remaining inactive themes until you are left only with your active themes.
Note that you can also delete inactive themes en masse from your WordPress site using FTP/SFTP or WP-CLI, but that is beyond the scope of this article.
Also, it’s highly recommended that you use your Staging site to try out and experiment with new themes, and push them into production when you’re ready.