Physics.OverlapSphere “creates” invisible sphere around given position and checks if there are colliders inside or touching the sphere - in short it finds colliders for given radius. Physics.SphereCastAll works like raycast with thickness, like you threw ball and check what is hit.
There is a lot of difference between them, but I guess you are interested in RaycastHit, so the first one just detects colliders, but it does not check any collision or intersection points, meanwhile second one actually finds hit position on the collider and other additional data. Anyway lines in your post are not going to give you the same result, read note in docs about overlapping colliders.