Ok, I'll explain:
The macro doesn't get called first. You got confused because you watched the top filter first. Start with <$vars
first the currentMonth and currentYear variables are defined.
Then the filter [all[tiddlers]!has[draft.of]!sort[created]get[created]removeprefix<currentYear>removeprefix<currentMonth>limit[3] does:
1: all tiddlers not currently open
2: !sort[created] ... sort by creation date but in reverse order - so the last created are on top of the list. Now the filter shows the creation dates of the tiddlers, not the names. The creation dates have the form: 20171205<hour><minute><seconds><nanoseconds?>
3: removeprefix<currentYear> ... removes the prefix "2017" from the creation dates. if the prefix is not 2017 the tiddler doesn't pass the filter. removeprefix<currentMonth> then removes the prefix "12" . Every tiddler that doesn't have "12" as prefix at that point doesn't pass. then limi[3] chooses the last three.
4. now you have the last three creation dates but without 201712 at the beginning. Just <hour><minute><seconds><nanoseconds>
5. <<getTiddlerTitle>> now calls the macro that is defined on top (macros have to be defined on top of the tiddler).
6. the filter [all[tiddlers]field:created[$(currentYear)$$(currentMonth)$$(currentTiddler)$]] now filters all tiddlers with creation date $(currentYear)$$(currentMonth)$$(currentTiddler)$ ... currentYear=2017 currentMonth=12 currentTiddler=the filter result from the removeprefix-filter. that is just the creation date without year and month. This filter makes a puzzle.
For your purpose you'll add "tag[Journal]" ( or your own journal tag ) after "all[tiddlers]" in both filters