Yeah - just give them comfort and kindness
Much like humans, dogs can easily instinctively work out when you are trying to do your best by them.
Water, shade, perhaps a bit of food if you have soemthing you can give them (they might have been lost for a while and be hungry) and just leave them to rest - they'll love you forever!
I'm a bit of a lost dog tragic too....everywhere I live I seem to "find" the lost dogs! I guess it's becuase when I see a dog on the roads etc, I always stop and make sure it's safe and if not and if I can catch them, I'll take them home and help them find their owners.
Never been hurt or bitten yet. As long as they are basically well, you come to them in non-threatening way adn they are an average family doggie - all good and owners are always SO grateful that someone took the time.
I would be, I know it.
Nice thing to do