Long covid is not sufficiently studied to indicate whether vaccines help.
Many of the patterns associated with long covid suggest that is a mix of one condition that has a mechanism probably similar to chronic fatigue syndrome and the other is the manifestation of long term sequelae that is common with other respiratory viruses.
My guess is that the vaccine might help with the CFS-like symptoms.
It probably is not really doing anything, I would think replacing the nocebo of being infected (or supposedly being infected) by SARS-CoV-2 in the past with the placebo of getting vaccinated (more recently, so you get a recency bias boost) makes up most of the "helping". If not that exactly a similar psychological re-targeting effect is probable.
It's still unknown what causes long covid. Lingering virus is one hypothesis that's still plausible. Indeed some people believe it precisely because the vaccines seem to be helping significant numbers of people (but not everyone, they can also make it worse for some people).
A substantial proportion of long covid cases share similarities (particularly demographics) with other syndromes of unknown mechanism, particularly chronic fatigue syndrome.
Many of the patterns associated with long covid suggest that is a mix of one condition that has a mechanism probably similar to chronic fatigue syndrome and the other is the manifestation of long term sequelae that is common with other respiratory viruses.
My guess is that the vaccine might help with the CFS-like symptoms.