When I want to drag the vertices along the axis with snapping enabled, they just follow the cursor without stopping anywhere. What am I doing wrong?
You are using vertex snapping, press g to grab and move the vertex it will snap to the closest vertex when you move the cursor over the vertex you want to snap to, it will follow the cursor until your cursor is over another vertex.
You can turn off snapping and when you press g then hold CTRL snapping will be on until you release CTRL. Saving you turning it on and off.