Moving Objects: Why are they overlapping? How do I add physics so they don't?

Ok, so I am trying to allow the user to move objects around the screen. However, my code as of this moment allows a user to switch which object they are holding without even picking up their hand. In other words, they can transition from one object to another just by dragging their finger across both of them, but I want them to only be able to hold one at a time. Also, when the user does this, the two objects overlap and basically become one, and the user can no longer separate them. My questions are: How do I add physics to the objects so that the objects cannot overlap no matter what the user does? How do I make it so that the user has to pick up his or her hand and press another object in order to start moving another object? My touchesMoved and touchesEnded are the same as touchesBegan. Also, my constrainCharacters and constrainObjects are the same. This project does not use Spritekit because it’s not really a game, but it does have some aspects of a game. Thank you in advance for your help!

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        for touch in (touches) {
            
            let location = touch.location(in: view)
            
            for image in characterArray {
                
                constrainCharacters(location, image)
                
            }
            for image in objectArray {
                
                constrainObjects(location, image)
            }
        }
    }
var location = location
        let image = character.imageView
        
        if image.frame.contains(location) {
            
            image.center = location
            
            if location.x < 101.5 {
                location.x = 101.5
                image.center = location
            }
            if location.y < 58.0 {
                location.y = 58.0
                image.center = location
            }
            if location.x > 610.0 {
                location.x = 610.0
                image.center = location
            }
            if location.y > 317.5 {
                location.y = 317.5
                image.center = location
            }
            
            character.location = location
        }
        print(character.location)
        print(character.imageView)