Loop data and go into another table

Ho, I would like to ask for help.

from here https://www.youtube.com/watch?v=AjAGidzvJzI, I learn how to duplicate data including the records connected to it in the same table.

Can you please help me how to duplicate the data but into another table.

I would like to click something in the Template table then it will copy that particular template together with the record connected to it and go into my table.

I hope you can help me. Thank you