There can be many issues that will affect our cognitive abilities. Stress a while made me think I had dementia. I got myself tested and all was okay and it settled when the stress level eased up.
It couldn't hurt to have a chat with your doctor to rule things out or see if there is issue to be addressed.