You open routes tab. There you must have that material routed there as an input (e.g. extracted raw material incoming to a storage facility). You can select that input and route it as an export to other facilities.
Does only work if you have an extractor. If you make a factory planet you have only the (empty)launchpad and the processors, and if you want to make a template to later use on planets, you can’t, without putting materials into the launchpad to create routes.
youtube is your friend with PI lots of peeps done videos on this, that and the templates that are now available.
Honestly I now use a spreadsheet I enter in what I am producing or extracting copy template build command centre then import it. Everything is done and you only need to feed it or manage the extraction process