For block deceleration inside latest magento 2 version, we need a block layout file . The naming of the file is important as this is the new way of using layout handles.
ex cms_index_index.xml . This will make our block only appear on the home page . Here each word of file name are in magento naming convenation i.e module_controller_action.xml. So, If you want to declare block for magento theme Place block declaration into the Magento_Theme/layout/cms_index_index.xml file. for magento module place block declaration into the app/code///view/frontend/layout ex:


