Girlie this page always helped me understand it:
"Lyme acts differently immunologically than many other germs. Patients with only IgM antibodies may have Lyme and or/ chronic Lyme. In the typical scenario of antibody response to infection the immune system makes IgM antibodies in early infection and then makes IgG antibodies in late infection. As the amount of IgG increases IgM decreases and then goes away. This is not always the case. Lyme is a clear exception to this rule."
[...]
"A large chunk of chronic Lyme patients have only IgM responses. Some have mixed IgM and IgG responses. In some cases IgG responses are favored and in others IgM."
https://lymemd.blogspot.com/2009/12/igm-question-is-it-chronic-lyme-disease.html