I have had the "good fortune" of having survived being bitten by a rattlesnake. And I mean nailed but good. It was 48 hours of agony, convulsions, tetanic contractions in every muscle in my body. Followed by having my entire arm turn blue, then black then fade to blue to fade completely in about 5 months. Some minor nerve damage persists even now, some 45 years later. Got a lot a looks for having one hand black and one hand normal.
When I am in "the woods" or wild spaces, and encounter poisonous snakes, I just get out of their way, as this is their habitat. Snakes are territorial, usually where you see a rattlesnake, it likely will be seen again within 150 meters of that location. Their territories are not very wide ranging. If a venomous snake takes up residence in your garage, or under your house, it can be a threat to yourself, your pets, your children. It is very understandable if you have to kill it. Tagging snakes captured and then relocated shows that a mature snake will return home with the accuracy of a homing pigeon for distances up to near 25 miles. Especially in temperate areas, once a snake finds a hibernarium (a location to hibernate the winter) the snake imprints on the location and will return year after year. There is a distance at which they won't be able to find their way back, but I don't know what it is.
So if you have children, or vulnerable pets, and a poisonous snake takes up residence in or under or around your home, it is perfectly reasonable to dispatch the snake to the great beyond. It is unreasonable to relocate the snake as it will likely return.
If your encounter with the snake is "in the woods" in the wild, or otherwise in areas natural for snakes to be located, just give it wide berth and leave it alone.