Apply a template to a Note by its name

What I’m trying to do

Does anyone know how to apply a template to a note by its name rather than where it was created?
Perhaps some kind of script via templater?

Or another way, first analyze the name of the note and then throw it in the appropriate folder

p.s

I have a Periodic Notes plugin that I can use to create a daily note, but if I create one myself, it doesn’t recognize it.