The only way to accurately compare the effectiveness of medical products, such as vaccines or drugs, is by direct comparison in head-to-head clinical trials, which did not happen for these vaccines.
Pfizer-BioNTech and Moderna both make an updated, bivalent dose designed to protect against original strains of the virus, as well as Omicron variants that cause most new infections. The CDC recommends eligible people 6 months and older receive an updated, bivalent Pfizer or Moderna vaccine that offers better protection against variants. Some people, like those who are immunocompromised or over 65, are eligible for a second bivalent dose.
The CDC has guidance for everyone 6 months and older based on age and medical condition.