Hey there,
Try not to get too anxious about cognitive issues, it can actually make it worse no matter what the cause is, and there are a lot of things besides MS that can cause cognitive issues, see your GP first it really could be lots of things eg anemia, b12, viral, infection, sleep related, medication side effect etc etc
I first realized something was cognitively off long long before MS ever came up, but i could always explain away why i had odd periods of time where i couldn't rec