For next time, and this is the thing that shortens the gap from weeks to one evening: never stop without writing down the next step.
Before a holiday, or even before an ordinary evening ends:
One sentence on what you were doing.
The literal next action. Not the goal: the actual next thing to open or type.
Anything in your head that is not written down. The concern, the half-formed idea, the thing you were about to test. This is the expensive part to reconstruct and it is nowhere on disk.
How to run the thing. Sounds unnecessary. After three weeks it is not, and hunting for the right command is exactly the kind of friction that ends an evening before it starts.
Same place every time, top of a file or a note you cannot miss.
The reason this works is that it moves the cost to when you have the context loaded and it is free, instead of to the moment when you have none and it is expensive.
And before a planned break specifically: leave it in a working state. Coming back to a half-finished refactor that does not compile is the surest way to not come back at all. Finish the small thing or revert it, then leave.