You asked

Which 35mm lens for the leica m typ 240 fits under 500 euros?

The Leica M (Typ 240) is a full-frame rangefinder, so a 35mm lens frames as marked. The guide's catalogue has a long list of 35mm lenses for it, but the pages I can see don't include prices, so the guide can't confirm which ones come in under 500 euros. Check the price section on each lens page before you buy.

Among the 35mm lenses for this body, three are worth a look at your budget:

If you mostly shoot in daylight, the slower 7Artisans M 35mm f/2.8 keeps the kit small and light. Avoid the f/5.6 model if you shoot indoors or at dusk.

Because the M has no in-body stabilisation, plan for slower shutter speeds when using a lens without it, and keep a fast aperture for low light.

Written by Claude from this site's pages.

From these pages

This answer is for the question above. Each answer is written for the exact question in its address, so a question with its details in it (a budget, what you shoot, what you already have) gets an answer about those details. An answer draws on all 15 pages of the guide and its catalogue of 320 cameras and 1050 lenses. Another question gets its own answer at its own address, as words after /ask/. Or fill in your own: /ask/which-camera-for-{what-you-shoot}-under-{budget}-euros or /ask/which-lens-for-{what-you-shoot}-on-{your-camera}.