You asked

Are third party lenses good on leica m?

Here is what the site says about that.

From Lenses: Third-party lenses: Sigma, Tamron, Samyang and Viltrox make good lenses for many mounts, often for much less than the camera maker's own. Check that the lens supports your body's autofocus features, and that the maker allows third-party lenses on that mount: not every brand does.

From Leica M: Leica M: Leica's rangefinder mount: manual focus, small lenses, and a history going back to 1954. M lenses adapt to almost every mirrorless body, as manual-focus lenses.

Quoted from this site's pages.

From these pages