Import records imports a found set of records when the file from which the data is imported is already open as is the case here.
But, found sets are specific to a given table occurrence. The found set you produce in your Main file does not have any effect on any found sets you may have in the template file because your found set was created via a table occurrence in the Main file--not template.fmp12.
You could perform a script in the template file to find these records, passing the criteria as a script parameter to that script, but you do not have to in this case.
It may not look like it, but import records steps actually refer to a table occurrence of a table in the specified source file. You just need to set up the import records step to import records from Main, via the table occurrence of your table from the template file. When you select the file for this import records step, select the copy of Main that you already have open. Then select the TemplateDetails table occurrence you already have in Main as your "source table".
For more on Table Occurrences, see this thread:Tutorial: What are Table Occurrences?