What is the difference between the IgM and IgG antibodies tests for COVID-19?

What is the difference between the IgM and IgG antibodies tests for COVID-19?

Both SARS-CoV-2 IgM and IgG antibodies may be detected around the same time after infection. However, while IgM is most useful for determining recent infection, it usually becomes undetectable weeks to months following infection; in contrast, IgG is usually detectable for longer periods.

See also  Is the Chase Sapphire worth it?