Adding a note to another note with variable

I want to give a note some sort of variable; be it a tag or whatever
Then I want to add all of those notes with said variable to a note which has the same name as the variable.

Or in whatever other way will make this possible.

See attached thread for Templater and other ideas.

None of those replies relate to what I actually asked about.

My friend, you want batteries, don’t go to the butcher’s. This is Obsidian and there are plugins that help you achieve what you want, but you may not be able to do it directly.
It is you who wants to achieve these things so instead of calling people names, why not try and look around, broaden your horizons and stop this passive aggressive behaviour? You got help in that other thread. If you want more immediate or personalized help, you must think about getting hired help or a course YouTubers are offering. The bare mininum is not bite the hand that tries to feed you.

In the meantime, food for thought:
How to create new file using code snippet or script? - Help - Obsidian Forum