https://www.cdc.gov/vaccines/covid-19/hcp/faq.html
Recommendations for vaccination depend on when a person has or had SARS-CoV-2 infection and when they received treatment.
People with a history of infection: Offer vaccination regardless of history of prior symptomatic or asymptomatic SARS-CoV-2 infection.
While there is no recommended minimum interval between infection and vaccination, current evidence suggests that the risk of SARS-CoV-2 reinfection is low in the months after initial infection but may increase with time due to waning immunity. While vaccine supply remains limited, people with recent documented acute SARS-CoV-2 infection may choose to temporarily delay vaccination, if desired. However, they should recognize that the risk of reinfection and, therefore, the need for vaccination, can increase with time following initial infection.
People with a current infection: Defer vaccination of people with known current SARS-CoV-2 infection until the person has recovered from acute illness (if the person has symptoms) and until criteria have been met for them to discontinue isolation. This recommendation applies to any vaccine, including the first and second doses of COVID-19 vaccine.