How to anchor railings into concrete correctly
There are several anchoring system for attaching to concrete or brick masonry. My favorite is a screw type anchor called tapcons. You need a hammer drill and a normal drill or impact driver to sink the concrete screws. The dill bit is included in the box of screws usually. Drill and prime the hole to remove excess dust. Then sink the screws directly in the holes. It cuts the grooves into the concrete when sinking.
There are also drop in anchors, redhead brand... with the hammer drill make your hole the correct dia. for the drop in anchor. Drill deep enough so the top is just below the surface. Then you have a drive tool that will flare the anchor securely in the hole. Afterwards the anchor will accept a normal threaded screw of the proper size. Remember to use weather resistant outdoor screws.
For widow shutters drill 1/4 in holes into morter joints an use plastic insert anchors. Then attach threaded screws thru the shutter into the plastic anchor