Rodents: Snakes are carnivores and often prey on rodents like mice and rats. If you have a rodent infestation in your yard or around your home, it could attract snakes seeking an easy meal.
Birds: Snakes also prey on birds and their eggs. If you have bird feeders or nesting areas in your yard, it might attract snakes looking for a meal.