Both doses of Moderna and Pfizer-BioNTech are needed for full protection. A single dose conveys a lower degree of protection from the virus than two doses.
A second dose of Pfizer should be administered approximately 21 days after your first dose. A second dose of Moderna should be administered approximately 28 days after you first dose. If you miss your second dose appointment, you should reschedule with the provider that administered your first dose as soon as possible.
The CDC indicates that it is safe to administer vaccines up to four days early. Anything beyond that should be considered an error and reported to your healthcare provider.