Well... I'm old coot!

But I do stuff like this all the time &, later on, wonder where my mind was!

I'm certainly no expert with regard to any of this. But, from what you wrote & based on my own experience, I would say this sounds like the effects of anxiety to me. From my perspective this is simply the sort of thing anxiety tends to do to a person.

So if you're not currently receiving any mental health services to deal with your anxiety, perhaps what you're experiencing is a sign the time has come. I wish you well...