it's unfortunate that you are suffering form the problem.
the problem seems to be related to concentration problem rather than a memory problem. memory problem (dementia) is extremely rare at your age.
there are many reasons for concentration problems. low mood, anxiety being common causes.
I suggest you to consult a psychiatrist for same, medication, memory tips would be helpful.
you may keep a small diary to note important tasks or "to do" list. a good smartphone is also helpful
Dr Shreyansh Dwivedi