Step 1 - Glue
Begin by applying a glue to the back of the siding and pressing it completely. Hold firmly for several minutes and allow it to secure. You will need to do this to each section experiencing the gap.
Step 2 - Screw In siding
Once the glue has dried, typically 24 to 48 hours, you will need to screw or nail in the siding so that it stays. You can either use a drill or a nail gun to get this job done, although a drill is often your best best for longer security.
Step 3 - Caulk Around
Once everything has been secured, you can use the caulk to go around the edges. This can help to keep water out so that your brick and siding do not loosen again. Use a caulking gun to apply a bead of caulk around the edges. Use a damp sponge to wipe off any excess and allow it to dry for 48 hours.
selected from: https://www.doityourself.com/stry/brick-wall-construction-basics