Normally the default value is enough for the merge by distance parameter to work, because in order for the vertices to be merged, it is best if they are occupying the same space in all three axis. So getting them really really one on top of the other so that they are basically occupying the same space.
Sometimes you can be looking at the vertices from an angle that you don’t realize they are far apart and you only realize it when you turn the camera around, but you didn’t realize it because they were occluding themselves. When in that situation, you try merging by distance and it doesn’t work and it leaves you scratching your head. Again, you have to make sure the vertices are really really close.
The distance parameter, the one you used fiddling with the numbers, comes handy in those sorts of situations, because the merging of the selected vertices is triggered by how close than a specified distance they are to each other. So if they are 0.05 distance apart, you tell Blender that anything that is closer than that will be merged, anything more apart, so if it’s 0.06 distance apart will be ignored and won’t get merged. When you increase the value, the gap in distance of what gets merged gets wider, and if vertices fall into that range, they get sucked in like a black whole.