Assuming you're using the past tense correctly, indicating the subject has recovered from the infection, the CDC says so:
Yes, you should be vaccinated regardless of whether you already had COVID-19. That’s because experts do not yet know how long you are protected from getting sick again after recovering from COVID-19. Even if you have already recovered from COVID-19, it is possible—although rare—that you could be infected with the virus that causes COVID-19 again. Studies have shown that vaccination provides a strong boost in protection in people who have recovered from COVID-19. Learn more about why getting vaccinated is a safer way to build protection than getting infected.
If you were treated for COVID-19 with monoclonal antibodies or convalescent plasma, you should wait 90 days before getting a COVID-19 vaccine. Talk to your doctor if you are unsure what treatments you received or if you have more questions about getting a COVID-19 vaccine.
If you or your child has a history of multisystem inflammatory syndrome in adults or children (MIS-A or MIS-C), consider delaying vaccination until you or your child have recovered from being sick and for 90 days after the date of diagnosis of MIS-A or MIS-C. Learn more about the clinical considerations people with a history of multisystem MIS-C or MIS-A.
Experts are still learning more about how long vaccines protect against COVID-19. CDC will keep the public informed as new evidence becomes available.
The WHO appears to agree:
Take whatever vaccine is made available to you first, even if you have already had COVID-19. It is important to be vaccinated as soon as possible once it’s your turn and not wait. Approved COVID-19 vaccines provide a high degree of protection against getting seriously ill and dying from the disease, although no vaccine is 100% protective.
The NIH suggests the same, but mentions a caveat (now obsolete in the US, as we have more doses than people who want them):
Conclusions: Prior infection in patients with COVID-19 was highly protective against reinfection and symptomatic disease. This protection increased over time, suggesting that viral shedding or ongoing immune response may persist beyond 90 days and may not represent true reinfection. As vaccine supply is limited, patients with known history of COVID-19 could delay early vaccination to allow for the most vulnerable to access the vaccine and slow transmission.
One study reported widely (but I'm unsure of its peer review status, and the sample size wasn't that big) even adds more optimism:
If you have recovered from coronavirus and confused about whether to get the vaccine or not, here is the answer. If people who recovered get even one dose of the vaccine, they are as safe as or even more than people who got 2 doses. This study has been published in Infectious Disease Journal.
On the basis of a study conducted at AIG Hospital, Hyderabad, the researchers claim that even a single dose gives a lot of protection to people who have recovered from COVID-19. The hospital has done a study on 260 health care workers. All of them had received a single dose of the Covishield vaccine between January 16 and February 5. The study was to see how much immunity the memory cells can produce when there is a disease.
The results revealed that in people who had been infected with COVID-19 before getting the vaccine, a lot of antibodies were produced in them from a single dose. Whereas in those who never had the infection, antibodies were less. Memory cells also created more immunity in such people.
That study was done in India, and is mostly reported in Indian-targeted news outlets.
Although the consensus is yes, a large unknown is the length of time either type of immunity will last. However, preliminary reports suggest that vaccine immunity may be better at combatting variants than natural immunity.