How To Find Custom Template ID Using Template Name In SharePoint

Sometimes, there are situations when we need to identify Template Id that we have created for custom template.