When using a vector, the restriction endonuclease used to cut out the DNA fragment must be the same as the one being used to break the plasmid loop. This way, the sticky ends of the opened-up plasmid are complementary to the sticky ends of the DNA fragment.