A word for when you're discussing a topic and then take a detour to another topic before coming back to the topic at hand
Solution 1:
Digression fits the circumstances you describe. It is the act of leaving the main subject you are writing or talking about, then writing or talking about something else before returning to the first theme. Dictionary definitions abound and I need not repeat them here, having now (I hope) awakened your memory.