I’m not sure exactly what you mean…
You assigned the materials to the wrong mesh?
or they are the correct material and mesh and you named them wrong?
If it’s the material to wrong mesh, you can just reassign them correctly or you can just rename them if that is the case.
That’s if I got the gist of the problem.