Add custom scetion & block to the store and restrict the section to certain templates

This is quite straight forward, just create a new section name custom_section.liquid,

Also restrict the section to home page and product templates