You asked

How does the canon rf 24mm f 1 8 macro is stm compare with the 35mm for handheld close up shots?

The guide can only compare these two lenses in part. Its page for the Canon RF 24mm f/1.8 Macro IS STM lists the specs, and it is stabilised, which matters for handheld close-ups. The Canon RF 35mm f/1.8 Macro IS STM page is brief and lists no specs, so the guide can't say whether the 35mm is stabilised or how close either one focuses.

What the guide can say is that both are fast macro primes for full frame, and both share f/1.8, so they handle similar light. The 24mm is the wider of the two, so it takes in more of the scene around a small subject. For flowers, food or objects where you want some setting in the frame, that is the more useful choice. The 35mm frames tighter, which suits isolating a detail. Since the 24mm is stabilised, it is the safer pick for handheld work. Stabilisation steadies the camera, not the subject, so it helps most when you are shooting slowly and close.

Either lens needs an RF-mount body. The 24mm fits a long list of Canon RF cameras, including the Canon EOS R6 Mark II, a full frame body that pairs well with a stabilised macro. If you are unsure which focal length you want, the guide suggests checking the 35mm's page for its specs before buying.

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