Every single thing you do is for your spiritual development.
Whether you realize it before, during, or after is irrelevant.
Any length of time before or after, including before your current birth and after your current death.
Furthermore, ‘every single thing’ includes every thing; not just actions that you take, but also actions which you do not take.
Whether ‘you forgot’ or ‘you were scared’ doesn’t matter.
You still did it, even if the ‘did’ was a ‘didn’t do’.