Check the compatibility matrix for metricbeat OSS and Opensearch. A similar discussion is here.
Make sure that
Both metricbeat and elasticsearch at the same version.
Both beat and ES is on OSS version.