By creating a separate two-step shortcut, I mean exactly what that says.I would create a brand new, empty, shortcut and put the two actions described above into it. I would give it a name, etc., and then run that second shortcut after I knew I had made my final entry. Remember that there’s no way the device could know for sure if it was going to be the final entry, so my gut feel is this would be best served by some independent decision step. This could be tied to a bedtime routine (e.g. one that sets a phone alarm), a reminder, etc. It happens independently of the recording.
One fully automated solution would be to use Pushcut’s automation server to run this just before midnight, and then it would be totally hands off (but you would need to consider working in time differences fr run time if you travel internationally).
An alternative approach, which reading between the lines may be what you had in mind but never previously explained, would be if you absolutely knew it was going to occur at or after 10 PM and never before, you could tag this on the end of your logging shortcut with a check on the time. You could prompt yourself with a reminder in any number of ways if you wanted to go this route.
This shortcut includes the two actions nested in the If (just break them out if you want a separate manual shortcut as per the first paragraph), and the If checks the hours of the current time in 24-hour format is greater than 21 (9 PM). If it is, it runs the steps.
Hopefully that all now makes sense.