Rather than repeat it all, please see...
Incidentally, a true "macro" lens (1:1 image scale meaning image on the sensor is the same size as the object being photographed in real life) provides the best performance.
There are other ways to do close-up photgraphy.
You can use "close up diopters" -- these are filters that thread onto the front of your lens (like a jeweler's magnifying loupe). They're much less expensive, but not as versatile and you may notice the image quality around the edges of the frame aren't quite as good.
You can use "extension tubes". These are hollow barrels (there is no glass in an extension tube) that are mounted between the camera and lens. You attach the extension tube to the camera body (as if it were a lens) then you attach the lens to the extension tube. They're not very expensive. By moving the entire lens farther away from the sensor, the entire focus range of the lens is shifted closer (the lens can now focus on subjects much closer than it could previously manage focus -- but also can not focus all the way out to "infinity" when the extension tube is in use.
When doing very close photography the depth of field gets extremely narrow. If you lock focus, but then your body moves forward or backward -- even by just a few millimeters -- then you'll throw off the focus on your intended subject. A tripod is a very handy at preventing that accidental shift.
Since the depth of field is so very narrow, it may not be possible to capture some objects completely in focus from front to back. Part of a flower may be sharp... but other areas quite out of focus. To resolve this, you can take multiple images and manually shift the focus just a very tiny bit each time. The set of images can be combined using "focus stacking" (Photoshop does this as part of the "photo merge" capability.) There are stand-alone programs that do focus stacking as well. You can also buy a device which mounts on the tripod called a "focus rail"... the camera is mounted on a short "track" ... perhaps 6" long. The rail has a knob on it with index marks and allows you to carefully move the camera by precise distances for each exposure.
Depth of field depends on a combination of the focal length of the lens, the subject distance, and the focal ratio.
Longer focal lengths reduce depth of field.
Closer focusing distances reduce depth of field.
Lower aperture values (wider physical size) reduces depth of field.
Most cameras do have a "depth of field preview" button (often on the front of the body near the lens mount). You can use this to get an idea of how much depth of field you'll have.
09/26/2023: New firmware updates are available.
08/18/2023: Canon EOS R5 C training series is released.
07/31/2023: New firmware updates are available.
05/31/2023: New firmware updates are available.
05/18/2023: New firmware updates are available.
03/30/2023: New firmware updates are available.