You asked

What are the alternatives to the canon ef s 24mm f 2 8 stm?

The guide doesn't name a direct swap for the Canon EF-S 24mm f/2.8 STM. Its catalogue page shows it is a prime for APS-C bodies only, frames like 38mm on full frame, and has no stabilisation. The closest alternatives depend on what you want the 24mm to do.

If you want a fast, slightly longer lens for people and low light, the guide's portrait lens advice points to a 50mm f/1.8. It is the guide's pick for a single people lens and is made for almost every mount. On APS-C it behaves like a classic 75-80mm, so it is a tighter view than your 24mm and suits headshots and subjects at a distance rather than wide scenes.

If you shot landscapes with the 24mm, the guide's landscape lens advice recommends a wide zoom, around 10-24mm on APS-C. It gives you the wide view with more framing options. You don't need a fast aperture for landscapes, so an f/4 zoom is a sensible, lighter choice.

The Canon RF 24mm f/1.8 Macro IS STM is a 24mm, but the guide lists it for full-frame cameras, so it is not a like-for-like APS-C replacement.

The guide doesn't give prices for these alternatives here, and prices change, so check the catalogue pages for current figures.

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}.