You asked
What are the alternatives to the canon ef 40mm f 2 8 stm?
The site's catalogue page for the Canon EF 40mm f/2.8 STM covers only that lens, so it can't name a direct substitute from its own listings. The guide's portrait advice does point to lenses that do similar jobs.
The 40mm is a modest, unstabilised prime for full-frame Canon EF bodies, and it sits between a wide and a standard view. If you want something a little brighter, the guide's cheapest option is the 50mm f/1.8, which it calls "the cheapest great lens in photography" and says is made for almost every mount. It gathers more than a stop more light than the 40mm at f/2.8, which helps in dim rooms and gives more background blur. On full frame it's a natural, slightly tight view.
If you want a wider view, the guide suggests the 35mm f/1.8 or f/1.4 for environmental portraits and groups. It shows more of the setting than the 40mm does.
For tighter portraits with a softer background, the guide recommends the 85mm f/1.8 on full frame. It has a longer working distance than the 40mm and flatters faces better, though it's a more specialised choice for general use.
The guide's aperture notes explain why a faster lens often matters more than stabilisation in dim light and with moving subjects. Stabilisation steadies the camera, not the subject. The site doesn't give prices for these alternatives, so check the lens pages for current figures when you compare.
Written by Claude from this site's 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}.