Template for making the Notes Appear in another folder as link based on Date

What I’m trying to do

So basically I have folders for Class Notes based on Courses, I want to make a template so that a note is created with date and week (I will set an initial number and when template is used in next week It will add a number to week number) and the notes made on that day will be inserted as link in this note. First the template should be able to scan if a note is already created with that particular date if it is then it should just insert the link.

Things I have tried

I have searched for plugins and solutions for templates but couldnt find any.