I'm in my 50s. The cognitive decline in my mid to late 40s was very, very real. I'm hanging on hard because I work at a FAANG and I have to keep my job, but I'm literally dumber than I was 10 years ago.
I don't know if there's anything you can do about it. I did start drinking those energy drinks with nootropics, at least the caffeine helps.
Some other suggestions are: get a lot of sleep, cognitively I declined tremendously when I got sleep deprivation. I would also get an MRI. I just read your comment about slurring words and I would spend the money and get an MRI on your own money just to be sure.