Don't feel bad lah, your heart was in the right place. Honestly, you did exactly what any decent person would do, and the kid's reaction doesn't mean you scared him or did something wrong, he was already upset and confused, so a stranger's voice probably just felt overwhelming at that moment. I think your husband has a point about stranger danger, but there's a difference between teaching kids not to accept things from strangers versus telling them that no adult should ever help if they're genuinely lost or in trouble. My boy once got panicky on the bus and when a lady asked if he was okay, he snapped at her too, but I was grateful she checked in. You handled it well by backing off when he said to, that actually showed good boundaries. If it happens again and you're genuinely concerned, maybe just a quick "Are you okay, do you need help?" and if they say no, leave it at that. You're not wrong for caring.