The best way is to avoid drilling into the brick itself. Brick sidewalks are not usually designed as anchor points; they flex, drain, and expand with weather, and drilling into the brick faces can crack or spall the pavers and create trip hazards. For most urban installations, use a heavy-duty surface-mounted bin base—either a weighted steel or concrete base or a steel mounting plate—set on a neoprene or rubber isolation pad so it does not grind or trap water on the brick.
If the bin must be fixed, anchor the mounting plate into the concrete slab, curb, or footing beneath or next to the brick, not into the brick faces. If there is no concrete to tie into, cut a small concrete pad flush with the sidewalk and cast stainless threaded inserts into it before setting the bin. If you have to go through a mortared brick surface, drill through mortar joints rather than brick faces and seal carefully.
Use 3/8 in to 1/2 in stainless steel wedge or chemical anchors with stainless bolts, washers, and cap nuts. Seal penetrations and leave drainage gaps so water does not sit under the plate. Check with the local public works department first: public sidewalks usually require a permit and may have rules for clear pedestrian width, fire access, tree protection, utilities, and snow-plow clearance.
In practice, keep at least 4 ft of clear walking path, place the bin where it can be serviced, and use four anchors plus a locking lid or chain in high-wind or high-theft areas. Inspect the base after freeze-thaw cycles and plowing, and replace loose anchors immediately.