I agree.
I don't necessarily buy the "loneliness" argument for cognitive decline.
However I certainly buy the importance of keeping mentally and physically active.
Infact I would go as far as saying people who use the "loneliness" term are actually just using it as a lazy synonym for "lack of mental and physical activity". You don't necessarily need to surround yourself with people to achieve it.
Whether its still working in a job, or doing non-job activities such as gardening, travelling, photography, I think keeping your brain busy and your body moving is the key.
If you revert to the cliché retirement image of taking long naps during the day, stopping only to eat and watch daytime TV, then IMHO that's where the problems start.
I am young, so I hopefully have not caused any permanent issues with my time of isolation - I shudder to think what it would do to me if I were 60 and facing the physical decline of old age.
Hugely unethical, but also not scientifically sound.
COVID infection itself has already been demonstrated in various papers to cause mental decline (TL;DR there seems to be a correlation between how "sick" you got and the amount of decline).
There is also the unknown of long-term post-COVID-infection consequences on the brain.
So you would have a bit of a hard time trying to seek to attribute lockdowns to mental decline. Especially, as we know, COVID can manifest itself as an asymptomatic disease.
You then have the additional question of what are you going to count the infectious isolation period as ? It would not be ethical to count it as "lockdown".
Basically it would be extremely difficult, if not impossible to achieve any sort of statistical segregation between "lockdown" and "COVID".
Thus your input data would be messy, and per the GarbageIn-GarbageOut rule, so would your "conclusion".
"Lockdowns" are also inherently subjective, social and difficult to study in any sort of meaningful way. Not least because different governments implemented them differently, and different populations adhered to them differently. So you'll never really get a clean dataset - and that's assuming people tell you the truth anyway about how compliant they were with the rules.
I think a more reasonable perspective would be to wait until we know more about COVID and (especially) long-COVID. Once the world knows more about the cognitive effect of COVID, then would be the time for secondary analysis on lockdowns.
Afterall, it may well be that lockdowns were more preferable to getting infected with COVID in terms of cognitive decline. Or it may be that both "options" were more or less equal in terms of decline. But for all that we need more time to study COVID itself.