Some people make them manually in Photoshop but another way to do this is to start from a 3d object and create a depth map. In Blender, it’s called Z pass. Essentially a Z pass is a visual representation of the distance from the camera to each pixel, meaning it ignores light sources. Anything you can 3d model you can convert. Zbrush can generate them as well. If you can’t 3d model you can download stls from thingy verse, turbosquid etc. Here’s a tutorial on how to do this in Blender.
Here’s one I created from downloaded stl
of course, some source objects are better than others for this kind of treatment.