For what it's worth, even people who've gone through this several times, with no problems, still worry every time!
There's no "one size fits all" solution, unless you have a very large garden and the funds to cat-proof it, perhaps.
Circumstances, like living on a busy road, are important, but also the temperament of the cat. Some are easier to keep indoors than others. (Most of the cats I've had would escape at some point if I didn't let them out!) There are advantages and disadvantages to letting them out or keeping them in. I prefer to let them out, so they get an idea of how to cope
if when they find themselves outside.
I live in a mid-terrace house, and let the cats out at the back, and they've sometimes wandered, but always found their way back. One cat, Clio, made a dash for it out of the front door, and went missing for nearly 4 months. She was well prepared for going out of one door, but panicked outside the other. My newest resident, Lily, also goes out the back, but I often see her waiting for me at the front when I'm coming back home, so she's much better at finding her way around.