Also for some viruses (again see covid-19), it's still advisable to get a vaccine even if you've already been infected. The protection rate and longevity of the vaccines can outweigh infection based antibodies dramatically.
In the case of HIV, it's potentially quite different, because HIV is such a unique disease, that yeah, a vaccine might not help anyway. But otherwise, your comment doesn't apply to vaccines in general (and it didn't seem like you were replying towards any specifics of HIV)