With close-ups for focus stacking it is important to avoid vibration, and it is important that you ensure uniform illumination.
The picture shows a Stack Shot rail that can be programmed in many ways to take the number of images of the desired distance.
Long shutter speeds easily gives vibrations of the equipment, that prevents sharp images. A flash that can last for many flashes, is often the best solutions. Some subjects are however, best photographed in natural light. The spider at the bottom is photographed in a greenhouse at daylight, with a shutter speed of 1/40, and where the mirror is raised, before the picture is taken.