I'm using SharePoint 2016 on premises , I was working on installing some site features, while doing so suddenly this happen,
Activate the SharePoint Server Publishing Infrastructure in the site collection level.
Then go to this page "YourSiteURL/_layouts/15/AreaTemplateSettings.aspx” this will take you to the site template configuration page. There you can select and configure what are the site templates should be available in the subsite creation.
For details refer to the below article: