For ranching, a good truck gun is an essential tool, and like all tools have to be tailored to the specific working environment. My comments reflect my experiences on our ranch in West Texas. But what works well in West Texas may not work in East Texas, Colorado, Nebraska, Kansas, New Mexico, etc.
For general ranch work, I think that for almost all things smaller than a coyote a 22 LR will work. But don't use hollow points. Solids tend to work better.
Handguns. I prefer revolvers because I don't like carrying a semiautomatic with a round in the chamber if I am working. If you fire it, then you will have another live round and have to trust the safety. (If you have ever had a handgun snatched out of your holster while on horseback in brush, you will know what I mean). I've used a Ruger Single 6 with 22 WRM cylinder (4 5/8 barrel) off and on for years for this--but it depends on what you are working on. If I am away from the truck and working on fences or water gaps, I will generally take the Ruger or a S&W 617 22 LR (with Remington Viper or another HV Solid). I am allergic to snakes, particularly when they are real close. (Every current and former working cowboy from West Texas has at least a dozen snake close call stories, so I won't bore you).
The 22 WMR is an outstanding choice for a compact rifle. The shotgun (I prefer 6 shot) will work better on snakes if you are not at close quarters or have to worry about ricochets. (NEVER use rat shot especially if the snake is on rocks. Been there, done that, picked #12 shot out of temple--thankful for shooting glasses. And ratshot will not reliably kill a big snake with one shot: It won't penetrate).
The Model 24 22 WMR/20 ga would be a good choice IF you can find one. In our area of West Texas, the rattle snakes tend to be tough and in deep brush so I prefer something larger than a 410. The 22 WMR is hard to argue with for general ranch work. I prefer to use solids in case you have to put sick or injured livestock down. Something like a Marlin XT-22M (clip or tubular) or Savage 93 would also work well. The Ruger is the shortest, but I never had much trouble in the cab with a standard length (except during deer season when I would not be using a 22--I have a Ruger Frontier and Marlin 336 BL for that...)