anorexia causing cognitive problems? is this normal?

TLDR: are cognitive problems normal while underweight? if so, how long will it take for the problem to go back to normal after gaining weight?

hi so I've been suffering from anorexia for around a year and a half now and I've been in recovery for most of it, but have been failing miserably. I was in intensive-care for a few months but I was an outpatient so I was allowed to go home everyday. I did end up gaining some weight but ended up losing some of it after I left. this is mainly due to my gastro-intestinal illness caused by (u guessed it) being underweight. I have been underweight for longer than I've had anorexia (since I was around 10 I think?) so yknow my body hasn't been doing too good these past couple years

my cognitive-function seems so strange all the time like I can't really form proper sentences sometimes? or I stutter. this really worries me as I'm doing lots of revision for my exams but I'm REALLY worried I'm just going to forget everything because of how under-nourished I am. this is really stressing me out as these exams dictate basically my career and what university I can apply to

I am really trying to get up to a healthy weight but the fact that I haven't been in that range for years scares me. its weird because I know my stomach problems will get better if I eat but its so fucking hard. luckily though, I am seeing a medical dietitian after seeing tons of ED specialist dieticians to finally help with my inability to feel hungry and struggle with eating food so hopefully that goes well. maybe centring weight gain less around my ED will help more? not sure till I see her ig