Do these in order. Skipping the foster step is the single most common mistake.
Vets in the area cannot keep dogs after surgery. It’s a common assumption that turns out wrong. A dog needs about 7 days of watching, antibiotics and often a cone after surgery. Ask a registered shelter or licensed vet to arrange where the dog will recover before you bring it in, not after.
Do not take a healthy stray to a shelter "just in case." In a large shelter, most dogs never come back out. For a dog that already has a home range, freedom there is usually the better outcome.
Based on the real process, from years spent actually doing this.