if it is a UIButton, right-click on it, you will see an option with segue enabled. Click on the round circle on the right side and drag it to the destination.
If it is a viewController, right-click on the ViewController next to the first responder (orange box), you will also see the segue option called up. Click on the round circle on the right side and drag it to the destination to create a segment.
source share