This study does not show a before and after cognitive decline from having COVID. It shows correlation between people with lower cognitive levels having COVID vs those who do not have COVID.
The causality could of course be going in the opposite direction from what you are implying (lower IQ -> more likely to get COVID).
The cognitive effects of COVID alone (discussed recently at [0]) are probably much more harmful in expectation than the vaccine side-effects, even accounting for the relatively high likelihood that those effects are not real, not causal, and/or reversible.
[0] https://old.reddit.com/r/COVID19/comments/oq4vho/cognitive_d...