Hi,
If I understand correctly, the gap between the top of the brick wall and the roof structure is normal in this type of construction and should be closed mainly for insulation and weather protection.
Usually this space is filled with mineral wool (rock or glass wool) for insulation, combined with a vapor barrier on the warm side. On the outside, it’s often closed with wood panels, cement boards, or brick infill, depending on the facade system. Styrofoam (EPS/XPS) can also be used, but mineral wool is generally better for breathability and fire safety.