Most snakes found in and around homes are harmless and are there because something they eat is there. The first four things you do matter more than how fast you act.
One: keep everyone back and keep it in sight
Move people and pets out of the room. Close the door. If you can watch from a safe distance without approaching, do, because a snake that disappears behind an appliance turns a ten minute job into a two hour one.
Do not attempt to catch it, pin it or kill it. A high proportion of snake bites happen during an attempt to handle or kill the snake.
Two: do not guess the species
Colour and pattern are unreliable identifiers for most people, and several harmless species mimic venomous ones closely. Photograph it from a distance if you can do so safely and send the photo when you call.
Identification changes the handling approach entirely, which is why it is the first thing done on arrival.
Three: work out how it got in
Gaps under exterior doors, crawl space vents, foundation cracks, unsealed utility penetrations and open garage doors are the common routes. Snakes do not chew their way in; they use what is already open.
A snake in a basement or crawl space very often means a rodent population you had not noticed. That is the real finding on a lot of these calls.
Four: understand why it chose your property
Food, shelter and cover. Woodpiles against the house, dense ground cover, rock walls, tall grass at the perimeter and standing water all make a yard attractive.
Removing the rodents removes the reason. Habitat changes at the foundation line remove the shelter. Those two together do more than any repellent product on a shelf.