I second the question, "for shooting what?"
Different requirements can dictate the type of rest.
But, in general, a sandbag of some type allows solid support, yet also "gives" enough under recoil to prevent bad movement. But if the muzzle blast is allowed to happen on the bag, it can & will damage the bag.
There are various "V-type" handgun rests. As long as it has a firm, yet flexible rest for the frame & maybe part of the barrel, it will work. Add to it by having a rear rest for the hands.
This info is for shooting off a bench.
If in the field,, different types of a rest are required. Primos makes a thing called a "Trigger Stick" that's quite good for hunting use.