The Centers for Disease Control and Prevention (CDC) recommends that the second dose of the COVID-19 vaccine be given within 3 weeks of the first dose for the Pfizer vaccine and within 4 weeks for the Moderna vaccine. No more than 6 weeks should lapse between doses, although if the second dose is not given during these time frames, it can be given without the need to repeat the first dose. It is not recommended to give the second dose any earlier than stated above, but if a person needs to get the second dose earlier, giving the second dose up to 4 days ahead of schedule is allowed.
Necessity of 2 Doses of the Pfizer and Moderna COVID-19 Vaccines — https://jamanetwork.com/journals/jama/fullarticle/2776229