It depends upon the pest.
Squirrels: kill them and
compost them.
Rats: kill them and compost them.
Possums: kill them and compost them.
There is NO END to these critters, particularly since my neighbors junk in his back yard is a possum and rat nursery. They are easily dispatched.
Raccoons: trap them and relocate them. I don't get these but every 4 or 5 years or so, but they are smart and tough to catch.
Birds: co-exist. They do way more good in the garden than harm. I'll plant sunflowers and corn here and there in unused space, just to feed them. This morning I had a bunch of blue jays out in the orchard, enjoying the cobs of corn I threw out there for them. For the minimal damage they do, birds eat bugs, poop, and bring me a great deal of joy.
Other than the raccoons, all the others provide nutrients to the soil.
"The rule of no realm is mine. But all worthy things that are in peril as the world now stands, these are my care. And for my part, I shall not wholly fail in my task if anything that passes through this night can still grow fairer or bear fruit and flower again in days to come. For I too am a steward. Did you not know?" Gandolf