You asked

Is the canon ef s 24mm f 2 8 stm better than the 18 55mm kit lens for tabletop still life?

Here is what the site says about that.

From Canon EF-S 24mm f/2.8 STM: Canon EF-S 24mm f/2.8 STM: A prime lens by Canon for APS-C cameras, 24mm f/2.8. Specs - Maker: Canon - Focal length: 24mm (prime) - Maximum aperture: f/2.8 - Made for: APS-C sensors - Mounts: Canon EF - Stabilised: no - Autofocus: yes What it frames like - On APS-C (Canon) (Canon EF): like 38mm on full frame; f/2.8 gives about the depth of field of f/4.5 there. - Not usable on the larger-sensor bodies ...

From Canon EF-S 18-55mm f/4-5.6 IS STM: Canon EF-S 18-55mm f/4-5.6 IS STM: A zoom lens by Canon for APS-C cameras, 18-55mm f/4-5.6.

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