To lose the thread / To lose track
Literally 'to lose the thread'. Describes losing track of what you were saying or following in a conversation, story, or argument.
I was interrupted and lost the thread of what I was saying.
The explanation was so long that I lost track.
—Where were we? —I've lost the thread, could you repeat it?